Skip to content

Commit

Permalink
Fix nuget localization issue (dotnet#15329)
Browse files Browse the repository at this point in the history
* Fix nuget localization issue
  • Loading branch information
KevinRansom authored and majocha committed Jun 8, 2023
1 parent 76ee7af commit 23d1a12
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ module internal Utilities =

result |> List.ofSeq |> List.map (fun option -> split option)

let executeTool pathToExe arguments workingDir timeout =
let executeTool pathToExe arguments workingDir environment timeout =
match pathToExe with
| Some path ->
let errorsList = ResizeArray()
Expand All @@ -195,6 +195,10 @@ module internal Utilities =
psi.Arguments <- arguments
psi.CreateNoWindow <- true
psi.EnvironmentVariables.Remove("MSBuildSDKsPath") // Host can sometimes add this, and it can break things

for varname, value in environment do
psi.EnvironmentVariables.Add(varname, value)

psi.UseShellExecute <- false

use p = new Process()
Expand Down Expand Up @@ -240,7 +244,7 @@ module internal Utilities =
let workingDir = Path.GetDirectoryName projectPath
let dotnetHostPath = getDotnetHostPath ()
let args = arguments "msbuild -v:quiet"
let success, stdOut, stdErr = executeTool dotnetHostPath args workingDir timeout
let success, stdOut, stdErr = executeTool dotnetHostPath args workingDir [] timeout

#if DEBUG
let diagnostics =
Expand Down Expand Up @@ -289,7 +293,7 @@ module internal Utilities =
let args = "nuget list source --format detailed"

let success, stdOut, stdErr =
executeTool dotnetHostPath args scriptDirectory timeout
executeTool dotnetHostPath args scriptDirectory [ "DOTNET_CLI_UI_LANGUAGE", "en-us" ] timeout
#if DEBUG
let diagnostics =
[|
Expand Down

0 comments on commit 23d1a12

Please sign in to comment.