From 660345d18ae00cb728241935f81a3f956f0b577e Mon Sep 17 00:00:00 2001 From: Frank Skare Date: Sun, 17 Nov 2019 14:49:42 +0100 Subject: [PATCH] update script change --- mpv.net/Update.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mpv.net/Update.ps1 b/mpv.net/Update.ps1 index fb7e7cfc..1a55a9eb 100644 --- a/mpv.net/Update.ps1 +++ b/mpv.net/Update.ps1 @@ -5,11 +5,11 @@ $targetFile = $targetDir + '.7z' Write-Host 'Download new version' -ForegroundColor Green curl.exe $args[0] --location --output $targetFile -if (-not $?) { throw "curl error: $LastExitCode" } +if ($LastExitCode) { throw $LastExitCode } Write-Host 'Unpack new version' -ForegroundColor Green & ($args[1] + '\7z\7za.exe') x -y $targetFile -o"$targetDir" -if (-not $?) { throw "7zip error: $LastExitCode" } +if ($LastExitCode) { throw $LastExitCode } Write-Host 'Delete downloaded file' -ForegroundColor Green Remove-Item $targetFile -Force -Recurse