Success!
This commit is contained in:
parent
a473c2bad7
commit
d70aeb950b
1 changed files with 14 additions and 12 deletions
|
@ -2,6 +2,7 @@
|
|||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
|
||||
using Microsoft.Build.Framework;
|
||||
|
@ -21,21 +22,22 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
protected abstract string Args { get; }
|
||||
|
||||
protected override Dictionary<string, string> EnvironmentOverride
|
||||
protected override ProcessStartInfo GetProcessStartInfo(
|
||||
string pathToTool,
|
||||
string commandLineCommands,
|
||||
string responseFileSwitch)
|
||||
{
|
||||
get
|
||||
{
|
||||
var ev2r = new EnvironmentFilter()
|
||||
.GetEnvironmentVariableNamesToRemove();
|
||||
var psi = base.GetProcessStartInfo(
|
||||
pathToTool,
|
||||
commandLineCommands,
|
||||
responseFileSwitch);
|
||||
|
||||
foreach (var ev in ev2r)
|
||||
foreach (var environmentVariableName in new EnvironmentFilter().GetEnvironmentVariableNamesToRemove())
|
||||
{
|
||||
Console.WriteLine($"EV {ev}");
|
||||
psi.Environment.Remove(environmentVariableName);
|
||||
}
|
||||
|
||||
return ev2r
|
||||
.ToDictionary(e => e, e => (string)null);
|
||||
}
|
||||
return psi;
|
||||
}
|
||||
|
||||
public string WorkingDirectory { get; set; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue