encode arg for cscript
This commit is contained in:
parent
67d20da312
commit
16db4b4c1c
2 changed files with 3 additions and 2 deletions
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
var
|
var
|
||||||
FSO_ForReading = 1, FSO_ForWriting = 2,
|
FSO_ForReading = 1, FSO_ForWriting = 2,
|
||||||
PS_MSG = 'Microsoft Windows PowerShell is required.\n' +
|
PS_MSG = 'Microsoft Windows PowerShell is required.' +
|
||||||
'https://technet.microsoft.com/en-us/library/hh847837.aspx',
|
' https://technet.microsoft.com/en-us/library/hh847837.aspx',
|
||||||
|
|
||||||
input, fso, tty,
|
input, fso, tty,
|
||||||
options = (function(conf) {
|
options = (function(conf) {
|
||||||
|
|
|
@ -212,6 +212,7 @@ function readlineExt(options) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (IS_WIN && !process.env.PSModulePath) { // Windows Script Host
|
if (IS_WIN && !process.env.PSModulePath) { // Windows Script Host
|
||||||
|
options.encoded = true; // Parsing args is DOS?
|
||||||
// ScriptPW (Win XP and Server2003) needs TTY stream as STDIN.
|
// ScriptPW (Win XP and Server2003) needs TTY stream as STDIN.
|
||||||
// In this case, If STDIN isn't TTY, an error is thrown.
|
// In this case, If STDIN isn't TTY, an error is thrown.
|
||||||
execOptions.stdio = [process.stdin];
|
execOptions.stdio = [process.stdin];
|
||||||
|
|
Loading…
Reference in a new issue