Skip to content

Commit

Permalink
(chocolateyGH-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 committed Aug 24, 2016
1 parent 634868f commit 484da9a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,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 484da9a

Please sign in to comment.