Commit af883e1f authored by Tessei Kameyama's avatar Tessei Kameyama Committed by João Reis
Browse files

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: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarJoão Reis <reis@janeasystems.com>
Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
Reviewed-By: default avatarRefael Ackermann <refack@gmail.com>
parent 3209679b
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment