[Helix] Install ef tool to work item root instead of globally (#21025)
This commit is contained in:
parent
6e06ff8a16
commit
f86eb17fb4
|
|
@ -44,7 +44,7 @@ namespace RunTests
|
||||||
EnvironmentVariables.Add("NUGET_FALLBACK_PACKAGES", helixDir);
|
EnvironmentVariables.Add("NUGET_FALLBACK_PACKAGES", helixDir);
|
||||||
var nugetRestore = Path.Combine(helixDir, "nugetRestore");
|
var nugetRestore = Path.Combine(helixDir, "nugetRestore");
|
||||||
EnvironmentVariables.Add("NUGET_RESTORE", nugetRestore);
|
EnvironmentVariables.Add("NUGET_RESTORE", nugetRestore);
|
||||||
var dotnetEFFullPath = Path.Combine(nugetRestore, $"dotnet-ef/{Options.EfVersion}/tools/netcoreapp3.1/any/dotnet-ef.exe");
|
var dotnetEFFullPath = Path.Combine(nugetRestore, helixDir, "dotnet-ef.exe");
|
||||||
Console.WriteLine($"Set DotNetEfFullPath: {dotnetEFFullPath}");
|
Console.WriteLine($"Set DotNetEfFullPath: {dotnetEFFullPath}");
|
||||||
EnvironmentVariables.Add("DotNetEfFullPath", dotnetEFFullPath);
|
EnvironmentVariables.Add("DotNetEfFullPath", dotnetEFFullPath);
|
||||||
|
|
||||||
|
|
@ -138,11 +138,10 @@ namespace RunTests
|
||||||
errorDataReceived: Console.Error.WriteLine);
|
errorDataReceived: Console.Error.WriteLine);
|
||||||
|
|
||||||
await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet",
|
await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet",
|
||||||
$"tool install dotnet-ef --global --version {Options.EfVersion}",
|
$"tool install dotnet-ef --version {Options.EfVersion} --tool-path {Options.HELIX_WORKITEM_ROOT}",
|
||||||
environmentVariables: EnvironmentVariables,
|
environmentVariables: EnvironmentVariables,
|
||||||
outputDataReceived: Console.WriteLine,
|
outputDataReceived: Console.WriteLine,
|
||||||
errorDataReceived: Console.Error.WriteLine,
|
errorDataReceived: Console.Error.WriteLine);
|
||||||
throwOnError: false); // EF tool is sometimes already installed so we can ignore this failure
|
|
||||||
|
|
||||||
// ';' is the path separator on Windows, and ':' on Unix
|
// ';' is the path separator on Windows, and ':' on Unix
|
||||||
Options.Path += RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ";" : ":";
|
Options.Path += RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ";" : ":";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue