From 94fea2bb9e8cf409fb2d802b3789b0ece243b0ea Mon Sep 17 00:00:00 2001 From: Luke Sampson Date: Mon, 7 Oct 2013 12:16:43 +1000 Subject: [PATCH] 7zip decompress: allow recursive extract to fail with warning instead of failure --- lib/decompress.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/decompress.ps1 b/lib/decompress.ps1 index 0b8b111ac..dfd427750 100644 --- a/lib/decompress.ps1 +++ b/lib/decompress.ps1 @@ -13,7 +13,12 @@ function file_requires_7zip($fname) { function extract_7zip($path, $to, $recurse) { if(!$recurse) { write-host "extracting..." -nonewline } $output = 7z x "$path" -o"$to" -y - if($lastexitcode -ne 0) { abort "exit code was $lastexitcode" } + if($lastexitcode -ne 0) { + if($recurse) { + warn "couldn't extract $path, continuing"; return + } + abort "exit code was $lastexitcode" + } # recursively extract files, e.g. for .tar.gz $output | sls '^Extracting\s+(.*)$' | % {