Skip to content

Commit ae2734d

Browse files
authored
Merge pull request #1245 from gep13/docs-about-previous-version
(doc) Add information about environment variable
2 parents 586d88a + dc4ce9a commit ae2734d

File tree

1 file changed

+2
-0
lines changed
  • src/content/docs/en-us/create/functions

1 file changed

+2
-0
lines changed

src/content/docs/en-us/create/functions/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ Chocolatey makes a number of environment variables available (You can access any
117117
* ChocolateyPackageName - The name of the package, equivalent to the `<id />` field in the nuspec
118118
* ChocolateyPackageTitle - The title of the package, equivalent to the `<title />` field in the nuspec
119119
* ChocolateyPackageVersion - The version of the package, equivalent to the `<version />` field in the nuspec
120+
* ChocolateyPreviousPackageVersion - The previous version of an already installed package, when performing an upgrade
121+
* This environment variable is _only_ available in the `chocolateyInstall.ps1` file, and also the `pre`/`post` `install` hook scripts, when doing an upgrade operation
120122

121123
#### Advanced Environment Variables
122124

0 commit comments

Comments
 (0)