fix dotnet-repl-csi
This commit is contained in:
parent
9aa40106e2
commit
90307bc71e
1 changed files with 4 additions and 5 deletions
|
@ -30,11 +30,10 @@ namespace Microsoft.DotNet.Tools.Repl.Csi
|
||||||
var corerun = Path.Combine(AppContext.BaseDirectory, Constants.HostExecutableName);
|
var corerun = Path.Combine(AppContext.BaseDirectory, Constants.HostExecutableName);
|
||||||
var csiExe = Path.Combine(AppContext.BaseDirectory, "csi.exe");
|
var csiExe = Path.Combine(AppContext.BaseDirectory, "csi.exe");
|
||||||
var csiArgs = string.IsNullOrEmpty(scriptOpt) ? "-i" : scriptOpt;
|
var csiArgs = string.IsNullOrEmpty(scriptOpt) ? "-i" : scriptOpt;
|
||||||
var command = File.Exists(corerun) && File.Exists(csiExe) ?
|
var result = Command.Create(csiExe, csiArgs)
|
||||||
Command.Create(corerun, $@"""{csiExe}"" {csiArgs}") :
|
.ForwardStdOut()
|
||||||
Command.Create(csiExe, csiArgs);
|
.ForwardStdErr()
|
||||||
command = command.ForwardStdOut().ForwardStdErr();
|
.Execute();
|
||||||
var result = command.Execute();
|
|
||||||
return result.ExitCode;
|
return result.ExitCode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue