mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 07:42:08 -04:00
Improve tmp dir
This commit is contained in:
parent
5a8809d753
commit
64eee76299
1 changed files with 5 additions and 2 deletions
|
|
@ -94,7 +94,10 @@ Aborting auto-upgrade process.
|
|||
|
||||
Write-Message "Starting Certbot auto-upgrade from $currentVersion to $latestVersion ..."
|
||||
|
||||
$installerPath = "$env:TMP/certbot-installer-win32.exe"
|
||||
$tmpPath = Join-Path ([System.IO.Path]::GetTempPath()) ([System.Guid]::NewGuid())
|
||||
New-Item -ItemType Directory -Path $tmpPath
|
||||
|
||||
$installerPath = Join-Path $tmpPath "certbot-installer-win32.exe"
|
||||
try {
|
||||
# Download the installer
|
||||
Write-Message "Downloading the installer ..."
|
||||
|
|
@ -132,7 +135,7 @@ $_
|
|||
Aborting auto-upgrade process.
|
||||
"@
|
||||
} finally {
|
||||
Remove-Item $installerPath -ErrorAction 'Ignore'
|
||||
Remove-Item $tmpPath -Recurse -ErrorAction 'Ignore'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue