diff --git a/packages/angular/cli/utilities/package-metadata.ts b/packages/angular/cli/utilities/package-metadata.ts index 26b3f446b135..942fe5412579 100644 --- a/packages/angular/cli/utilities/package-metadata.ts +++ b/packages/angular/cli/utilities/package-metadata.ts @@ -91,8 +91,8 @@ function readOptions( } const defaultConfigLocations = [ - path.join(globalPrefix, 'etc', baseFilename), - path.join(homedir(), dotFilename), + (!yarn && process.env.NPM_CONFIG_GLOBALCONFIG) || path.join(globalPrefix, 'etc', baseFilename), + (!yarn && process.env.NPM_CONFIG_USERCONFIG) || path.join(homedir(), dotFilename), ]; const projectConfigLocations: string[] = [