From 80307f7979a130522483c6dbbc885e4c81bf7e91 Mon Sep 17 00:00:00 2001 From: Kevin Ransom Date: Tue, 6 Jun 2023 11:49:34 -0700 Subject: [PATCH 1/3] Fix nuget localization issue --- .../FSharp.DependencyManager.Utilities.fs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs b/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs index 31a9e003457..34206e1b581 100644 --- a/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs +++ b/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs @@ -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() @@ -195,6 +195,9 @@ 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) // Host can sometimes add this, and it can break things + psi.UseShellExecute <- false use p = new Process() @@ -240,7 +243,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 = @@ -289,7 +292,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 = [| From f8b7618c955b868cecb7d67331f876314f85ba4c Mon Sep 17 00:00:00 2001 From: Kevin Ransom Date: Tue, 6 Jun 2023 12:00:31 -0700 Subject: [PATCH 2/3] fantomas --- .../FSharp.DependencyManager.Utilities.fs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs b/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs index 34206e1b581..a59fbbb468a 100644 --- a/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs +++ b/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs @@ -195,8 +195,9 @@ 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) // Host can sometimes add this, and it can break things + psi.EnvironmentVariables.Add(varname, value) // Host can sometimes add this, and it can break things psi.UseShellExecute <- false @@ -292,7 +293,7 @@ module internal Utilities = let args = "nuget list source --format detailed" let success, stdOut, stdErr = - executeTool dotnetHostPath args scriptDirectory ["DOTNET_CLI_UI_LANGUAGE", "en-us"] timeout + executeTool dotnetHostPath args scriptDirectory [ "DOTNET_CLI_UI_LANGUAGE", "en-us" ] timeout #if DEBUG let diagnostics = [| From 068616f8d3cc39e4fd800ddf86c994257b0589ac Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Tue, 6 Jun 2023 12:04:01 -0700 Subject: [PATCH 3/3] Update FSharp.DependencyManager.Utilities.fs remove copied comment --- .../FSharp.DependencyManager.Utilities.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs b/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs index a59fbbb468a..b083202fa72 100644 --- a/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs +++ b/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs @@ -197,7 +197,7 @@ module internal Utilities = 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) // Host can sometimes add this, and it can break things + psi.EnvironmentVariables.Add(varname, value) psi.UseShellExecute <- false