-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Description
Current Behavior:
Running npm publish --help tells you to run npm publish help:
» npm publish --help
npm publish
Usage:
npm publish [<folder>] [--tag <tag>] [--access <public|restricted>] [--dry-run]
Run "npm publish help" for more info
Doing that gets:
» npm publish help
npm notice
npm notice 📦 help@3.0.2
npm notice === Tarball Contents ===
...
npm notice === Tarball Details ===
npm notice name: help
npm notice version: 3.0.2
npm notice filename: help-3.0.2.tgz
npm notice package size: 2.5 kB
npm notice unpacked size: 5.3 kB
npm notice shasum: 96e190d4a0a453b89c2cb4b05ab38e3a8f9fdadd
npm notice integrity: sha512-jDd0MU+9xzvOQ[...]gHFm4MTefkkpA==
npm notice total files: 10
npm notice
npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in.
npm ERR! need auth You need to authorize this machine using `npm adduser`
Which I believe means it tried to publish the package called help!! Oh no!
I then tried npm help publish as seemed to make more sense, and it suggested "did you mean one of these? publish":
» npm help publish
Top hits for "publish"
————————————————————————————————————————————————————————————————————————————————
npm help scripts publish:28
npm help package-json publish:19
npm help publish publish:17
npm help scope publish:17
npm help developers publish:15
npm help unpublish publish:13
npm help config publish:7
npm help access publish:7
npm help npm publish:7
npm help diff publish:6
————————————————————————————————————————————————————————————————————————————————
(run with -l or --long to see more context)
Did you mean one of these?
publish
unpublish
This was quite confusing!
Also, the buggy npm publish help type suggestion is present in npm install's --help output: it tells you to npm install help which installs the help package into the local directory. 😱
» npm i --help
npm install
Usage:
...
aliases: i, in, ins, inst, insta, instal, isnt, isnta, isntal, add
Run "npm install help" for more info
Expected Behavior:
The suggested command from npm publish --help for additional help should be a valid command, npm help publish should either say there is no help or otherwise not suggest publish when that was the input.
Steps To Reproduce:
See above
Environment:
- OS: Arch Linux
- npm version: 7.6.2
- node: v15.11.0
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release