FS#69969 - [npm] "npm help" subcommand is broken in npm 7 Arch package
Attached to Project:
Community Packages
Opened by D (DeeDeeG) - Saturday, 13 March 2021, 01:11 GMT
Last edited by Daniel M. Capella (polyzen) - Sunday, 30 April 2023, 04:24 GMT
Opened by D (DeeDeeG) - Saturday, 13 March 2021, 01:11 GMT
Last edited by Daniel M. Capella (polyzen) - Sunday, 30 April 2023, 04:24 GMT
|
Details
Description:
There is a subcommand of npm: "npm help". (Usage: `npm help [npm subcommand here]`. For example: `npm help ci`.) On Linux/macOS, `npm help` can show the manpage for any npm subcommand. This is not working in the Arch package, but it's working in npm directly from the npm package registry. Additional info: * package version(s): npm 7.6.3-1, Node 15.11.0-1 * link to upstream bug report: https://github.com/npm/cli/issues/2857 (It was determined that this was an Arch packaging bug, not an upstream bug, since it's fully working everywhere outside of the custom Arch package.) Steps to reproduce: - With npm from the Arch package, do `npm help ci`. Expected: Manpage for "npm-ci" is shown. Actual: ``` $ npm help ci Top hits for "ci" —————————————————————————————————————————————————————————————————————————————— npm help package-json ci:76 npm help install ci:73 npm help config ci:62 npm help package-lock-json ci:24 npm help exec ci:17 npm help scripts ci:16 npm help npx ci:15 npm help update ci:14 npm help ls ci:13 npm help ci ci:13 —————————————————————————————————————————————————————————————————————————————— (run with -l or --long to see more context) Did you mean this? ci ``` - Counter-example: Working npm directly from the npm package registry: - mkdir get_npm_as_modules && cd get_npm_as_module - npm install npm@7 - npx npm help ci Output: ``` NPM-CI(1) NPM-CI(1) NAME npm-ci - Install a project with a clean slate Synopsis npm ci Description [ . . . ] ``` |
This task depends upon
Closed by Daniel M. Capella (polyzen)
Sunday, 30 April 2023, 04:24 GMT
Reason for closing: Fixed
Additional comments about closing: 8.19.2-2. Thanks Nick!
Sunday, 30 April 2023, 04:24 GMT
Reason for closing: Fixed
Additional comments about closing: 8.19.2-2. Thanks Nick!
The git program also provides manual pages and a 'git help subcommand' or 'git subcommand --help', but does so by invoking the system man command and assuming the manual can be found.
I tried hacking the npm source code to use the system manual directory but it wasn't very performant doing its own slow directory search traversal. :/
If system-wide man pages are important, an upstream request could be made first. I would do it, but I always use 'git help', and don't see the benefits personally.