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 committed Apr 24, 2024
1 parent 6a7ebb2 commit 02e93f8
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 @@ -23,14 +23,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') },
})

/** Gets the npm config. */
Expand Down

0 comments on commit 02e93f8

Please sign in to comment.