Is there an existing issue for this?
This issue exists in the latest npm version
This is not just a request to bump a dependency for a CVE
Current Behavior
Config viewer is completely ignored, unless it's "browser" or "woman":
|
let args = ['man', [man]] |
Expected Behavior
According to the docs, viewer should be "the program to use to view help content".
|
viewer: new Definition('viewer', { |
|
default: isWindows ? 'browser' : 'man', |
|
defaultDescription: ` |
|
"man" on Posix, "browser" on Windows |
|
`, |
|
type: String, |
|
description: ` |
|
The program to use to view help content. |
|
|
|
Set to \`"browser"\` to view html help content in the default web browser. |
|
`, |
|
}), |
Steps To Reproduce
npm config --global set viewer batman
npm help exec
- batman is never invoked
Environment
- npm: 12.0.1
- Node.js: v26.5.1
- OS Name: Arch Linux
- System Model Name: x86_64
- npm config:
; "user" config from /home/marmis/.config/npm/npmrc
; cache = "/home/marmis/.cache/npm" ; overridden by env
ignore-scripts = true
; init-module = "/home/marmis/.config/npm/npm-init.js" ; overridden by env
logs-dir = "/home/marmis/.local/state/npm/logs"
min-release-age = 7
viewer = "batman"
; "env" config from environment
cache = "/home/marmis/.cache/npm"
init-module = "/home/marmis/.config/npm/npm-init.js"
userconfig = "/home/marmis/.config/npm/npmrc"
; node bin location = /usr/bin/node
; node version = v26.5.1
; npm local prefix = /home/marmis
; npm version = 12.0.1
; cwd = /home/marmis
; HOME = /home/marmis
; Run `npm config ls -l` to show all defaults.
Is there an existing issue for this?
This issue exists in the latest npm version
This is not just a request to bump a dependency for a CVE
Current Behavior
Config
vieweris completely ignored, unless it's"browser"or"woman":cli/lib/commands/help.js
Line 90 in 278df04
Expected Behavior
According to the docs,
viewershould be "the program to use to view help content".cli/workspaces/config/lib/definitions/definitions.js
Lines 2750 to 2761 in 278df04
Steps To Reproduce
npm config --global set viewer batmannpm help execEnvironment