Skip to content

Commit

Permalink
(GH-925) Make package title available to $env
Browse files Browse the repository at this point in the history
Some times the title of the package must be presented to the user in a
"pretty" matter. The Package Id helps, but is not "GUI-friendly".
To avoid the need to parse the Id ourselves, this adds the access to the
package title as an environment variable.
  • Loading branch information
andmos authored and ferventcoder committed Sep 12, 2016
1 parent 2767025 commit d36c699
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@ public void prepare_powershell_environment(IPackage package, ChocolateyConfigura

Environment.SetEnvironmentVariable("chocolateyPackageName", package.Id);
Environment.SetEnvironmentVariable("packageName", package.Id);
Environment.SetEnvironmentVariable("chocolateyPackageTitle", package.Title);
Environment.SetEnvironmentVariable("packageTitle", package.Title);
Environment.SetEnvironmentVariable("chocolateyPackageVersion", package.Version.to_string());
Environment.SetEnvironmentVariable("packageVersion", package.Version.to_string());
Environment.SetEnvironmentVariable("chocolateyPackageFolder", packageDirectory);
Expand Down

0 comments on commit d36c699

Please sign in to comment.