Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nuget localization issue #15329

Merged
merged 3 commits into from
Jun 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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