From d36c699ba257d7935afa5093938ffdfc8bc3681c Mon Sep 17 00:00:00 2001 From: andmos Date: Wed, 24 Aug 2016 10:54:54 +0200 Subject: [PATCH] (GH-925) Make package title available to $env 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. --- src/chocolatey/infrastructure.app/services/PowershellService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/chocolatey/infrastructure.app/services/PowershellService.cs b/src/chocolatey/infrastructure.app/services/PowershellService.cs index d42d8c357c..4a9bbc016b 100644 --- a/src/chocolatey/infrastructure.app/services/PowershellService.cs +++ b/src/chocolatey/infrastructure.app/services/PowershellService.cs @@ -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);