Fixing the tool used in the test that I changed when trying things out and fixing the code that sets environment variables in the command to check if the environment variable already exists before adding it.
This commit is contained in:
parent
318c9f3e44
commit
d779ab3e3f
2 changed files with 5 additions and 2 deletions
|
@ -27,7 +27,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="dotnet-dependency-tool-invoker">
|
||||
<DotNetCliToolReference Include="dotnet-invoke-portable">
|
||||
<Version>1.0.0-rc-*</Version>
|
||||
</DotNetCliToolReference>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -31,7 +31,10 @@ namespace Microsoft.DotNet.Cli.Utils
|
|||
|
||||
foreach(var environmentVariable in commandSpec.EnvironmentVariables)
|
||||
{
|
||||
psi.Environment.Add(environmentVariable);
|
||||
if (!psi.Environment.ContainsKey(environmentVariable.Key))
|
||||
{
|
||||
psi.Environment.Add(environmentVariable.Key, environmentVariable.Value);
|
||||
}
|
||||
}
|
||||
|
||||
_process = new Process
|
||||
|
|
Loading…
Reference in a new issue