remove-legacy-yarnrc-path.patch 1.1 KB

123456789101112131415161718192021222324252627282930
  1. --- a/src/util/rc.js
  2. +++ b/src/util/rc.js
  3. @@ -34,8 +34,6 @@ function getRcPaths(name: string, cwd: string): Array<string> {
  4. pushConfigPath(CONFIG_DIRECTORY);
  5. pushConfigPath(home, '.config', name, 'config');
  6. pushConfigPath(home, '.config', name);
  7. - pushConfigPath(home, `.${name}`, 'config');
  8. - pushConfigPath(home, `.${name}rc`);
  9. }
  10. // add .yarnrc locations relative to the cwd
  11. --- a/src/registries/yarn-registry.js
  12. +++ b/src/registries/yarn-registry.js
  13. @@ -8,6 +8,7 @@ import NpmRegistry from './npm-registry.js';
  14. import {stringify, parse} from '../lockfile';
  15. import * as fs from '../util/fs.js';
  16. import {version} from '../util/yarn-version.js';
  17. +import {getConfigDir} from '../util/user-dirs';
  18. const userHome = require('../util/user-home-dir').default;
  19. const path = require('path');
  20. @@ -53,7 +54,7 @@ export default class YarnRegistry extends NpmRegistry {
  21. ) {
  22. super(cwd, registries, requestManager, reporter, enableDefaultRc, extraneousRcFiles);
  23. - this.homeConfigLoc = path.join(userHome, '.yarnrc');
  24. + this.homeConfigLoc = getConfigDir();
  25. this.homeConfig = {};
  26. }