From 1b8b1d2b2cc82b6427846a259783f452a550583a Mon Sep 17 00:00:00 2001 From: jonsequitur Date: Tue, 21 Mar 2017 14:56:12 -0700 Subject: [PATCH] use muxer path whenever invoking dotnet --- .../Commands/TestCommand.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/TestCommand.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/TestCommand.cs index ce6a01e3b..03ee56d6c 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/TestCommand.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/TestCommand.cs @@ -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 ExecuteAsyncInternal(string executable, string args) { var stdOut = new List(); @@ -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);