Fix error when trying to delete and file doesn't exist

This commit is contained in:
Steve Streeting 2023-07-20 14:46:50 +01:00
parent b55c4b0dac
commit f036323a82

View File

@ -219,7 +219,7 @@ try {
Write-Output "" Write-Output ""
} else { } else {
Remove-Item -Path $zipdst -Force Remove-Item -Path $zipdst -Force -ErrorAction SilentlyContinue
$proc = Start-Process "7z.exe" $argList -Wait -PassThru -NoNewWindow $proc = Start-Process "7z.exe" $argList -Wait -PassThru -NoNewWindow
if ($proc.ExitCode -ne 0) { if ($proc.ExitCode -ne 0) {
throw "7-Zip failed!" throw "7-Zip failed!"