Skip to content

Commit

Permalink
usage: Correct "npm COMMAND help" to "npm help COMMAND"
Browse files Browse the repository at this point in the history
PR-URL: #2855
Credit: @dwardu
Close: #2855
Reviewed-by: @ruyadorno, @darcyclarke
  • Loading branch information
dwardu authored and ruyadorno committed Mar 11, 2021
1 parent b0ae548 commit 8c44e99
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 70 deletions.
2 changes: 1 addition & 1 deletion lib/base-command.js
Expand Up @@ -19,7 +19,7 @@ class BaseCommand {

// Mostly this just appends aliases, this could be more clear
usage = usageUtil(this.constructor.name, usage)
usage = `${usage}\n\nRun "npm ${this.constructor.name} help" for more info`
usage = `${usage}\n\nRun "npm help ${this.constructor.name}" for more info`
return usage
}

Expand Down
10 changes: 5 additions & 5 deletions tap-snapshots/test-lib-dist-tag.js-TAP.test.js
Expand Up @@ -15,7 +15,7 @@ npm dist-tag ls [<pkg>]
alias: dist-tags
Run "npm dist-tag help" for more info
Run "npm help dist-tag" for more info
`

exports[`test/lib/dist-tag.js TAP add missing pkg name > should exit usage error message 1`] = `
Expand All @@ -28,7 +28,7 @@ npm dist-tag ls [<pkg>]
alias: dist-tags
Run "npm dist-tag help" for more info
Run "npm help dist-tag" for more info
`

exports[`test/lib/dist-tag.js TAP add new tag > should return success msg 1`] = `
Expand All @@ -50,7 +50,7 @@ npm dist-tag ls [<pkg>]
alias: dist-tags
Run "npm dist-tag help" for more info
Run "npm help dist-tag" for more info
`

exports[`test/lib/dist-tag.js TAP ls in current package > should list available tags for current package 1`] = `
Expand All @@ -69,7 +69,7 @@ npm dist-tag ls [<pkg>]
alias: dist-tags
Run "npm dist-tag help" for more info
Run "npm help dist-tag" for more info
`

exports[`test/lib/dist-tag.js TAP ls on missing package > should log no dist-tag found msg 1`] = `
Expand Down Expand Up @@ -118,7 +118,7 @@ npm dist-tag ls [<pkg>]
alias: dist-tags
Run "npm dist-tag help" for more info
Run "npm help dist-tag" for more info
`

exports[`test/lib/dist-tag.js TAP remove non-existing tag > should log error msg 1`] = `
Expand Down
2 changes: 1 addition & 1 deletion tap-snapshots/test-lib-publish.js-TAP.test.js
Expand Up @@ -11,5 +11,5 @@ npm publish
Usage:
npm publish [<folder>] [--tag <tag>] [--access <public|restricted>] [--dry-run]
Run "npm publish help" for more info
Run "npm help publish" for more info
`

0 comments on commit 8c44e99

Please sign in to comment.