summaryrefslogtreecommitdiff
path: root/doc/api/child_process.md
diff options
context:
space:
mode:
authorTessei Kameyama <kamenoko315@ruri.waseda.jp>2018-07-21 21:24:08 +0900
committerJoão Reis <reis@janeasystems.com>2018-09-05 20:52:02 +0100
commitaf883e1f99598492474c13447e2a1895c0c6f1b7 (patch)
tree31096b4f6402dc8abe22d93a7a91975921c88554 /doc/api/child_process.md
parent3209679b7f9ec9bd3ffc6cf2c56c6c5583be6b87 (diff)
downloadandroid-node-v8-af883e1f99598492474c13447e2a1895c0c6f1b7.tar.gz
android-node-v8-af883e1f99598492474c13447e2a1895c0c6f1b7.tar.bz2
android-node-v8-af883e1f99598492474c13447e2a1895c0c6f1b7.zip
child_process: fix switches for alternative shells on Windows
On Windows, normalizeSpawnArguments set "/d /s /c" for any shells. It cause exec and other methods are limited to cmd.exe as a shell. Powershell and git-bash are often used instead of cmd.exe, and they can recieve "-c" switch like unix shells. So normalizeSpawnArguments is changed to set "/d /s /c" for cmd.exe, and "-c" for others. Fixes: https://github.com/nodejs/node/issues/21905 PR-URL: https://github.com/nodejs/node/pull/21943 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: João Reis <reis@janeasystems.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'doc/api/child_process.md')
-rw-r--r--doc/api/child_process.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/api/child_process.md b/doc/api/child_process.md
index 5b2b16f253..9cee76c02e 100644
--- a/doc/api/child_process.md
+++ b/doc/api/child_process.md
@@ -415,7 +415,7 @@ changes:
[Default Windows Shell][]. **Default:** `false` (no shell).
* `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is
done on Windows. Ignored on Unix. This is set to `true` automatically
- when `shell` is specified. **Default:** `false`.
+ when `shell` is specified and is CMD. **Default:** `false`.
* `windowsHide` {boolean} Hide the subprocess console window that would
normally be created on Windows systems. **Default:** `true`.
* Returns: {ChildProcess}
@@ -867,7 +867,7 @@ changes:
[Default Windows Shell][]. **Default:** `false` (no shell).
* `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is
done on Windows. Ignored on Unix. This is set to `true` automatically
- when `shell` is specified. **Default:** `false`.
+ when `shell` is specified and is CMD. **Default:** `false`.
* `windowsHide` {boolean} Hide the subprocess console window that would
normally be created on Windows systems. **Default:** `true`.
* Returns: {Object}
@@ -1432,8 +1432,9 @@ to `stdout` although there are only 4 characters.
## Shell Requirements
-The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows.
-On Windows, command line parsing should be compatible with `'cmd.exe'`.
+The shell should understand the `-c` switch. If the shell is `'cmd.exe'`, it
+should understand the `/d /s /c` switches and command line parsing should be
+compatible.
## Default Windows Shell