Skip to content

Commit

Permalink
fix: use HOME environment variable for npm configuration file lookup (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
plasticrake authored and raineorshine committed Apr 25, 2024
1 parent 522a3b1 commit dfb9466
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/libnpmconfig/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ const NpmConfig = figgyPudding(
)

const ConfigOpts = figgyPudding({
cache: { default: path.join(os.homedir(), '.npm') },
cache: { default: path.join(process.env.HOME || os.homedir(), '.npm') },
configNames: { default: ['npmrc', '.npmrc'] },
envPrefix: { default: /^npm_config_/i },
cwd: { default: () => process.cwd() },
globalconfig: {
default: () => path.join(getGlobalPrefix(), 'etc', 'npmrc'),
},
userconfig: { default: path.join(os.homedir(), '.npmrc') },
userconfig: { default: path.join(process.env.HOME || os.homedir(), '.npmrc') },
})

module.exports.read = getNpmConfig
Expand Down

0 comments on commit dfb9466

Please sign in to comment.