-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements --no-default-rc and --use-yarnrc #6007
Conversation
|
AppVeyor is timeouting on the publish command, unrelated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Little late to the party, but this pull request has added a feature that I did not yet know I needed. Thanks, |
@arcanis, @bestander please see issue #6174 I dug into this a bit and from my limited understanding of the code base it seems that the new options Manually changing the code to look like this seemed to correct the issue for me (but I have no idea if this is the correct fix): async function updateCwd(config: Config): Promise<void> {
await fs.mkdirp(config.globalFolder);
await config.init({
cwd: config.globalFolder,
binLinks: true,
globalFolder: config.globalFolder,
cacheFolder: config._cacheRootFolder,
linkFolder: config.linkFolder,
// added missing config
enableDefaultRc: config.enableDefaultRc,
extraneousYarnrcFiles: config.extraneousYarnrcFiles,
});
} |
@clintwood - I've just run into the same issue on Dependabot (where we create our own config, and weren't passing through a value for |
@greyepoxy - That was the other option I thought of, however, it looks like the missing config settings are set to default values on initialisation if not set by this PR's command line switches by BTW just skimming through the tests it seemed this specific issue did not have any test cases. |
+1 for |
Summary
This PR implements the
--no-default-rc
and--use-yarnrc
options.--no-default-rc
disable the rcfile lookup--use-yarnrc <path>
loads a specified yarnrc fileThis allow to make more deterministic installs, since the exact rc files used are now known to the caller. I haven't implemented
--use-npmrc
as every settings should be configurable from a yarnrc file anyway.Test plan
Added tests.