`pnpm config get` on keys containing a forward slash (`/`) returns `undefined` · Issue #9345 · pnpm/pnpm · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In pnpm@10.7.0 running pnpm config get [key] or pnpm get [key] where [key] contains a / always prints undefined regardless of whether the value is set or not
Expected behavior
pnpm config set key-containing-/slash value
pnpm config get key-containing-/slash
# prints 'value'
Actual behavior
pnpm config set key-containing-/slash value
pnpm config get key-containing-/slash
# prints 'undefined'
Additional information
I encountered this while attempting to get the current npm token with pnpm config get //registry.npmjs.org/:_authToken in a build script.
This is an issue for any key containing a /, I am not aware of any other problematic characters.
Quoting the key doesn't fix the issue.
pnpm config delete also has the same issue: config keys containing a / can't be deleted
Node.js version
v22.14.0
Operating System
macOS
The text was updated successfully, but these errors were encountered:
We will fix it but it still won't return the token. The npm registry auth related settings are managed by npm CLI and npm CLI throws an error when someone tries to read the auth token via CLI.
Last pnpm version that worked
10.6.5
pnpm version
10.7.0
Code to reproduce the issue
In
pnpm@10.7.0
runningpnpm config get [key]
orpnpm get [key]
where[key]
contains a/
always printsundefined
regardless of whether the value is set or notExpected behavior
Actual behavior
Additional information
I encountered this while attempting to get the current npm token with
pnpm config get //registry.npmjs.org/:_authToken
in a build script.This is an issue for any key containing a
/
, I am not aware of any other problematic characters.Quoting the key doesn't fix the issue.
pnpm config delete
also has the same issue: config keys containing a/
can't be deletedNode.js version
v22.14.0
Operating System
macOS
The text was updated successfully, but these errors were encountered: