Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlec Larson <aleclarson@users.noreply.github.com>2018-04-18 23:24:19 +0300
committerKat Marchán <kzm@zkat.tech>2018-04-18 23:24:19 +0300
commitad7a5962d758efcbcfbd9fda9a3d8b38ddbf89a1 (patch)
tree92e3577136dad1ecd6075ed8675a3ec4f49092d5 /doc
parenta1c77d614adb4fe6769631b646b817fd490d239c (diff)
docs: add --if-present to run-script docs (#20279)
PR-URL: https://github.com/npm/npm/pull/20279 Credit: @aleclarson Reviewed-By: @iarna
Diffstat (limited to 'doc')
-rw-r--r--doc/cli/npm-run-script.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/cli/npm-run-script.md b/doc/cli/npm-run-script.md
index 314abf37b..20fcaa941 100644
--- a/doc/cli/npm-run-script.md
+++ b/doc/cli/npm-run-script.md
@@ -68,6 +68,10 @@ you will be given a warning to run `npm install`, just in case you've forgotten.
You can use the `--silent` flag to prevent showing `npm ERR!` output on error.
+You can use the `--if-present` flag to avoid exiting with a non-zero exit code
+when the script is undefined. This lets you run potentially undefined scripts
+without breaking the execution chain.
+
## SEE ALSO
* npm-scripts(7)