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);
|
ResolveCommand(ref resolvedCommand, ref args);
|
||||||
|
|
||||||
var commandPath = Env.GetCommandPath(resolvedCommand, ".exe", ".cmd", "") ??
|
Console.WriteLine($"Executing (Captured Output) - {resolvedCommand} {args} - {WorkingDirectoryInfo()}");
|
||||||
Env.GetCommandPathFromRootPath(_baseDirectory, resolvedCommand, ".exe", ".cmd", "");
|
|
||||||
|
|
||||||
Console.WriteLine($"Executing (Captured Output) - {commandPath} {args} - {WorkingDirectoryInfo()}");
|
|
||||||
|
|
||||||
return Task.Run(async () => await ExecuteAsyncInternal(resolvedCommand, args)).Result;
|
return Task.Run(async () => await ExecuteAsyncInternal(resolvedCommand, args)).Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private async Task<CommandResult> ExecuteAsyncInternal(string executable, string args)
|
private async Task<CommandResult> ExecuteAsyncInternal(string executable, string args)
|
||||||
{
|
{
|
||||||
var stdOut = new List<String>();
|
var stdOut = new List<String>();
|
||||||
|
@ -209,8 +205,11 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
|
|
||||||
executable = new Muxer().MuxerPath;
|
executable = new Muxer().MuxerPath;
|
||||||
}
|
}
|
||||||
|
else if ( executable == "dotnet")
|
||||||
if (!Path.IsPathRooted(executable))
|
{
|
||||||
|
executable = new Muxer().MuxerPath;
|
||||||
|
}
|
||||||
|
else if (!Path.IsPathRooted(executable))
|
||||||
{
|
{
|
||||||
executable = Env.GetCommandPath(executable) ??
|
executable = Env.GetCommandPath(executable) ??
|
||||||
Env.GetCommandPathFromRootPath(_baseDirectory, executable);
|
Env.GetCommandPathFromRootPath(_baseDirectory, executable);
|
||||||
|
|
Loading…
Reference in a new issue