From 532203040fef79b0edf45fb2f7463dcaa1f871eb Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 22 Mar 2022 19:03:13 +0100 Subject: [PATCH] Fix PATH env var expanding in Flax.Build app runner --- Source/Tools/Flax.Build/Utilities/Utilities.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Tools/Flax.Build/Utilities/Utilities.cs b/Source/Tools/Flax.Build/Utilities/Utilities.cs index 72278c72e..e693c1b42 100644 --- a/Source/Tools/Flax.Build/Utilities/Utilities.cs +++ b/Source/Tools/Flax.Build/Utilities/Utilities.cs @@ -355,14 +355,14 @@ namespace Flax.Build Stopwatch stopwatch = Stopwatch.StartNew(); if (!options.HasFlag(RunOptions.NoLoggingOfRunCommand)) { - Log.Verbose("Running: " + app + " " + (string.IsNullOrEmpty(commandLine) ? "" : commandLine)); + Log.Verbose("Running: " + app + (string.IsNullOrEmpty(commandLine) ? "" : " " + commandLine)); } bool redirectStdOut = (options & RunOptions.NoStdOutRedirect) != RunOptions.NoStdOutRedirect; Process proc = new Process(); proc.StartInfo.FileName = app; - proc.StartInfo.Arguments = string.IsNullOrEmpty(commandLine) ? "" : commandLine; + proc.StartInfo.Arguments = commandLine != null ? commandLine : ""; proc.StartInfo.UseShellExecute = false; proc.StartInfo.RedirectStandardInput = input != null; proc.StartInfo.CreateNoWindow = true; @@ -386,7 +386,7 @@ namespace Flax.Build { if (env.Key == "PATH") { - proc.StartInfo.EnvironmentVariables[env.Key] = proc.StartInfo.EnvironmentVariables[env.Key] + ';' + env.Value; + proc.StartInfo.EnvironmentVariables[env.Key] = env.Value + ';' + proc.StartInfo.EnvironmentVariables[env.Key]; } else {