| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Users/All Users/chocolatey/lib/chocolatey-core.extension/extensions/ |
Upload File : |
<#
.SYNOPSIS
Get temporary location for the package based on its name and version.
.DESCRIPTION
The function returns package cache directory within $Env:TEMP. It will not create the directory
if it doesn't exist.
This function is useful when you have to obtain the file using `Get-ChocolateyWebFile` in order
to perform certain installation steps that other helpers can't do.
.EXAMPLE
Get-PackageCacheLocation
.OUTPUTS
[String]
.LINKS
Get-ChocolateyWebFile
#>
function Get-PackageCacheLocation {
[CmdletBinding()]
param (
# Name of the package, by default $Env:ChocolateyPackageName
[string] $Name = $Env:ChocolateyPackageName,
# Version of the package, by default $Env:ChocolateyPackageVersion
[string] $Version = $Env:ChocolateyPackageVersion,
# Allows splatting with arguments that do not apply and future expansion. Do not use directly.
[parameter(ValueFromRemainingArguments = $true)]
[Object[]] $IgnoredArguments
)
if (!$Name) { Write-Warning 'Environment variable $Env:ChocolateyPackageName is not set' }
$res = Join-Path $Env:TEMP $Name
if (!$Version) { Write-Warning 'Environment variable $Env:ChocolateyPackageVersion is not set' }
$res = Join-Path $res $Version
$res
}