From ebca5828b839e3e850e75208cffef2637cf5c6ba Mon Sep 17 00:00:00 2001 From: Rob Reynolds Date: Sun, 12 Jun 2016 13:49:54 -0500 Subject: [PATCH] (GH-439) update environment before setting custom Refreshing environment variables should be done before setting the values from configuration as any conflicts should be given to what is in the configuration - namely setting TEMP and other variables we want to override. --- src/chocolatey/infrastructure.app/services/PowershellService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chocolatey/infrastructure.app/services/PowershellService.cs b/src/chocolatey/infrastructure.app/services/PowershellService.cs index 026d611827..d770278173 100644 --- a/src/chocolatey/infrastructure.app/services/PowershellService.cs +++ b/src/chocolatey/infrastructure.app/services/PowershellService.cs @@ -374,8 +374,8 @@ public void prepare_powershell_environment(IPackage package, ChocolateyConfigura { if (package == null) return; - EnvironmentSettings.set_environment_variables(configuration); EnvironmentSettings.update_environment_variables(); + EnvironmentSettings.set_environment_variables(configuration); Environment.SetEnvironmentVariable("chocolateyPackageName", package.Id); Environment.SetEnvironmentVariable("packageName", package.Id);