fix dotnet-repl-csi

This commit is contained in:
Andrew Stanton-Nurse 2015-11-24 17:15:01 -08:00
parent 9aa40106e2
commit 90307bc71e

View file

@ -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;
} }
} }