Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
I'm trying to configure a project using the command line by setting a custom registry and CA file. The project will be built in a docker container, so all configuration should be configured relative to the project, and nothing from the host should be referenced.
Since npm automatically turns the relative paths into absolute paths when setting cafile, let's try an use an environment variable as documented here: https://docs.npmjs.com/cli/v7/configuring-npm/npmrc
npm config set cafile='\${PWD}/cafile.crt' --location=project
This results in the bug:
cafile=/absolute/path/to/project/${PWD}/cafile.crt
This is also an issue without setting location
Expected Behavior
I expect
npm config set cafile='\${PWD}/cafile.crt'
To write:
Steps To Reproduce
- run
npm config set cafile='\${PWD}/cafile.crt'
- see that unexpected data is written to .npmrc
Environment
- npm: 8.16.0
- Node.js: 16.14.2
- OS Name: MacOS Big Sur
- System Model Name:
- npm config:
; copy and paste output from `npm config ls` here
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
I'm trying to configure a project using the command line by setting a custom registry and CA file. The project will be built in a docker container, so all configuration should be configured relative to the project, and nothing from the host should be referenced.
Since npm automatically turns the relative paths into absolute paths when setting cafile, let's try an use an environment variable as documented here: https://docs.npmjs.com/cli/v7/configuring-npm/npmrc
This results in the bug:
This is also an issue without setting
locationExpected Behavior
I expect
To write:
Steps To Reproduce
npm config set cafile='\${PWD}/cafile.crt'Environment
; copy and paste output from `npm config ls` here