From 484da9a593dbba0746bce3c761ae1df170a1e1ab 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 ede41552f4..5071275ccd 100644 --- a/src/chocolatey/infrastructure.app/services/PowershellService.cs +++ b/src/chocolatey/infrastructure.app/services/PowershellService.cs @@ -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);