use muxer path whenever invoking dotnet
This commit is contained in:
parent
be86933ff8
commit
1b8b1d2b2c
1 changed files with 6 additions and 7 deletions
|
@ -70,15 +70,11 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
|
||||
ResolveCommand(ref resolvedCommand, ref args);
|
||||
|
||||
var commandPath = Env.GetCommandPath(resolvedCommand, ".exe", ".cmd", "") ??
|
||||
Env.GetCommandPathFromRootPath(_baseDirectory, resolvedCommand, ".exe", ".cmd", "");
|
||||
|
||||
Console.WriteLine($"Executing (Captured Output) - {commandPath} {args} - {WorkingDirectoryInfo()}");
|
||||
Console.WriteLine($"Executing (Captured Output) - {resolvedCommand} {args} - {WorkingDirectoryInfo()}");
|
||||
|
||||
return Task.Run(async () => await ExecuteAsyncInternal(resolvedCommand, args)).Result;
|
||||
}
|
||||
|
||||
|
||||
private async Task<CommandResult> ExecuteAsyncInternal(string executable, string args)
|
||||
{
|
||||
var stdOut = new List<String>();
|
||||
|
@ -209,8 +205,11 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
|
||||
executable = new Muxer().MuxerPath;
|
||||
}
|
||||
|
||||
if (!Path.IsPathRooted(executable))
|
||||
else if ( executable == "dotnet")
|
||||
{
|
||||
executable = new Muxer().MuxerPath;
|
||||
}
|
||||
else if (!Path.IsPathRooted(executable))
|
||||
{
|
||||
executable = Env.GetCommandPath(executable) ??
|
||||
Env.GetCommandPathFromRootPath(_baseDirectory, executable);
|
||||
|
|
Loading…
Reference in a new issue