diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PackagedCommandSpecFactory.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PackagedCommandSpecFactory.cs index 1d95c8ddd..dc2cfed2a 100644 --- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PackagedCommandSpecFactory.cs +++ b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PackagedCommandSpecFactory.cs @@ -122,6 +122,8 @@ namespace Microsoft.DotNet.Cli.Utils host = CoreHost.LocalHostExePath; } + arguments.Add(commandPath); + if (depsFilePath != null) { arguments.Add("--depsfile"); @@ -131,8 +133,6 @@ namespace Microsoft.DotNet.Cli.Utils arguments.Add("--additionalprobingpath"); arguments.Add(nugetPackagesRoot); - arguments.Add(commandPath); - arguments.AddRange(commandArguments); return CreateCommandSpec(host, arguments, commandResolutionStrategy);