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:
authorGabor Szabo <gszabo@users.noreply.github.com>2017-10-19 04:45:00 +0300
committerKat Marchán <kzm@sykosomatic.org>2017-10-19 04:45:00 +0300
commita9dc098a6eb7a87895f52a101ac0d41492da698e (patch)
treea9c9e4799be576087aee90dc3e098b128cef7a4b /doc
parentbe67de7b90790cef0a9f63f91c2f1a00942205ee (diff)
docs: write about script-shell config (#18679)
PR-URL: https://github.com/npm/npm/pull/18679 Credit: @gszabo Reviewed-By: @iarna
Diffstat (limited to 'doc')
-rw-r--r--doc/cli/npm-run-script.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/cli/npm-run-script.md b/doc/cli/npm-run-script.md
index 9ddff83c9..314abf37b 100644
--- a/doc/cli/npm-run-script.md
+++ b/doc/cli/npm-run-script.md
@@ -44,6 +44,12 @@ instead of
to run your tests.
+The actual shell your script is run within is platform dependent. By default,
+on Unix-like systems it is the `/bin/sh` command, on Windows it is the `cmd.exe`.
+The actual shell referred to by `/bin/sh` also depends on the system.
+As of [`npm@5.1.0`](https://github.com/npm/npm/releases/tag/v5.1.0) you can
+customize the shell with the `script-shell` configuration.
+
Scripts are run from the root of the module, regardless of what your current
working directory is when you call `npm run`. If you want your script to
use different behavior based on what subdirectory you're in, you can use the
@@ -69,3 +75,4 @@ You can use the `--silent` flag to prevent showing `npm ERR!` output on error.
* npm-start(1)
* npm-restart(1)
* npm-stop(1)
+* npm-config(7)