зеркало из https://github.com/Azure/autorest.git
Add shell=true when spawning cmd files in windows
This commit is contained in:
Родитель
1f91e166f3
Коммит
4c9c644fcc
|
@ -21,6 +21,9 @@ function run(command, args, options) {
|
|||
|
||||
if (process.platform === "win32" && isCmdOnWindows.includes(command)) {
|
||||
command += ".cmd";
|
||||
// When spawning .bat or .cmd files on windows, node will now error with EINVAL if shell is not set to true.
|
||||
// https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2
|
||||
options.shell = true;
|
||||
}
|
||||
|
||||
const proc = (options.sync ? spawnSync : spawn)(command, args, options);
|
||||
|
|
Загрузка…
Ссылка в новой задаче