Skip to content

Commit

Permalink
docs: match npm-exec.md -p usage with lib/exec.js
Browse files Browse the repository at this point in the history
updated usage from: https://github.com/npm/cli/blob/v7.0.1/lib/exec.js#L8-L20,
and removed extra `-p` occurrences to avoid confusion.

Credit: @dr-js
Close: #1970
Reviewed-by: @ruyadorno
  • Loading branch information
dr-js authored and darcyclarke committed Nov 3, 2020
1 parent 052e977 commit 52d32d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/content/commands/npm-exec.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ This command allows you to run an arbitrary command from an npm package
(either one installed locally, or fetched remotely), in a similar context
as running it via `npm run`.

Whatever packages are specified by the `--package` or `-p` option will be
Whatever packages are specified by the `--package` option will be
provided in the `PATH` of the executed command, along with any locally
installed package executables. The `--package` or `-p` option may be
installed package executables. The `--package` option may be
specified multiple times, to execute the supplied command in an environment
where all specified packages are available.

Expand All @@ -48,7 +48,7 @@ only be considered a match if they have the exact same name and version as
the local dependency.

If no `-c` or `--call` option is provided, then the positional arguments
are used to generate the command string. If no `-p` or `--package` options
are used to generate the command string. If no `--package` options
are provided, then npm will attempt to determine the executable name from
the package specifier provided as the first positional argument according
to the following heuristic:
Expand Down

0 comments on commit 52d32d1

Please sign in to comment.