public/Get-ChocolateyTempInstallDirectory.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
$chocolateyTmpInstallDir = $null; function Get-ChocolateyTempInstallDirectory() { if($chocolateyTmpInstallDir) { return $chocolateyTmpInstallDir; } $chocolatelyTmpDir = Get-ChocolateyTempDirectory; $chocolateyTmpInstallDir = Join-Path $chocolatelyTmpDir "chocoInstall" if(-not (Test-Path $chocolateyTmpInstallDir)) { New-Item $chocolateyTmpInstallDir -ItemType Directory | Write-Debug } return $chocolateyTmpInstallDir } |