Fix tryProcess on C#
This commit is contained in:
@@ -721,6 +721,7 @@ class Prelude {
|
|||||||
#end
|
#end
|
||||||
Sys.setCwd(cwd);
|
Sys.setCwd(cwd);
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
var p = new Process(command, args);
|
var p = new Process(command, args);
|
||||||
if (inputLines != null) {
|
if (inputLines != null) {
|
||||||
for (line in inputLines) {
|
for (line in inputLines) {
|
||||||
@@ -743,6 +744,10 @@ class Prelude {
|
|||||||
Sys.setCwd(lastCwd);
|
Sys.setCwd(lastCwd);
|
||||||
}
|
}
|
||||||
return output;
|
return output;
|
||||||
|
} catch (e) {
|
||||||
|
handleError('process $command $args failed: $e');
|
||||||
|
return "";
|
||||||
|
}
|
||||||
#elseif hxnodejs
|
#elseif hxnodejs
|
||||||
var p = if (inputLines != null) {
|
var p = if (inputLines != null) {
|
||||||
ChildProcess.spawnSync(command, args, {input: inputLines.join("\n"), cwd: cwd});
|
ChildProcess.spawnSync(command, args, {input: inputLines.join("\n"), cwd: cwd});
|
||||||
|
Reference in New Issue
Block a user