Files
Linux.js---javascript-OS/nodejs/patches/child_process_executor.diff
T
2022-02-26 19:31:33 +01:00

29 lines
939 B
Diff

576,587c576,578
< if (process.platform === 'win32') {
< if (typeof options.shell === 'string')
< file = options.shell;
< else
< file = process.env.comspec || 'cmd.exe';
< // '/d /s /c' is used only for cmd.exe.
< if (RegExpPrototypeTest(/^(?:.*\\)?cmd(?:\.exe)?$/i, file)) {
< args = ['/d', '/s', '/c', `"${command}"`];
< windowsVerbatimArguments = true;
< } else {
< args = ['-c', command];
< }
---
> if (typeof options.shell === 'string') {
> file = '/bin/executor';
> args = [ options.shell, ...command.split(' ') ]
589,595c580,581
< if (typeof options.shell === 'string')
< file = options.shell;
< else if (process.platform === 'android')
< file = '/system/bin/sh';
< else
< file = '/bin/sh';
< args = ['-c', command];
---
> file = '/bin/executor';;
> args = command.split(' ');