Fix command line length issue
Fixes long standing issue on windows where if the command line length was over 8191 characters, this was achieved by switching node.exec to use powershell.exe instead of cmd.exe on Windows
This commit is contained in:
parent
615cef700a
commit
1b5dfa0f3e
1 changed files with 5 additions and 1 deletions
|
|
@ -10,7 +10,11 @@ const exec = (pname: string, fpath: string, pargs: string, spc = false): {
|
|||
pargs = pargs ? ' ' + pargs : '';
|
||||
console.info(`\n> "${pname}"${pargs}${spc ? '\n' : ''}`);
|
||||
try {
|
||||
childProcess.execSync((fpath + pargs), { stdio: 'inherit' });
|
||||
if (process.platform === 'win32') {
|
||||
childProcess.execSync(('& ' + fpath + pargs), { stdio: 'inherit', 'shell': 'powershell.exe', 'windowsHide': true });
|
||||
} else {
|
||||
childProcess.execSync((fpath + pargs), { stdio: 'inherit' });
|
||||
}
|
||||
return {
|
||||
isOk: true
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue