Skip to content

Commit

Permalink
(GH-439) Refresh Environment Before Package Scripts
Browse files Browse the repository at this point in the history
Before running each package script, refresh the process environment
variables so that the subprocess will inherit those. This allows
updates to PATH and additional environment variables to be taken
advantage of in packages that may depend on them being set by a package
dependency that installs during the same run.
  • Loading branch information
ferventcoder committed Jun 5, 2016
1 parent 7552379 commit db70c9c
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ public bool run_action(ChocolateyConfiguration configuration, PackageResult pack
var failure = false;

EnvironmentSettings.set_environment_variables(configuration);
EnvironmentSettings.update_environment_variables();

var package = packageResult.Package;
Environment.SetEnvironmentVariable("chocolateyPackageName", package.Id);
Expand Down

0 comments on commit db70c9c

Please sign in to comment.