mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-24 07:38:12 -05:00
fix(config): use locale while parsing variables as camelcase (#8189)
close #8188
This commit is contained in:
5
.changeset/brown-apes-compare.md
Normal file
5
.changeset/brown-apes-compare.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/config": patch
|
||||
---
|
||||
|
||||
fix parsing of config variables in Turkish locale. Example: recursive-install parameter has problems on parsing.
|
||||
@@ -298,8 +298,8 @@ export async function getConfig (
|
||||
const rcOptions = Object.keys(rcOptionsTypes)
|
||||
|
||||
const pnpmConfig: ConfigWithDeprecatedSettings = Object.fromEntries([
|
||||
...rcOptions.map((configKey) => [camelcase(configKey), npmConfig.get(configKey)]) as any, // eslint-disable-line
|
||||
...Object.entries(cliOptions).filter(([name, value]) => typeof value !== 'undefined').map(([name, value]) => [camelcase(name), value]),
|
||||
...rcOptions.map((configKey) => [camelcase(configKey, { locale: 'en-US' }), npmConfig.get(configKey)]) as any, // eslint-disable-line
|
||||
...Object.entries(cliOptions).filter(([name, value]) => typeof value !== 'undefined').map(([name, value]) => [camelcase(name, { locale: 'en-US' }), value]),
|
||||
]) as unknown as ConfigWithDeprecatedSettings
|
||||
// Resolving the current working directory to its actual location is crucial.
|
||||
// This prevents potential inconsistencies in the future, especially when processing or mapping subdirectories.
|
||||
|
||||
Reference in New Issue
Block a user