From a9bfd2d2a268e8812c1489a47f3ae6c355dafd72 Mon Sep 17 00:00:00 2001 From: Jack Bennett Date: Wed, 5 Mar 2014 14:00:35 +0000 Subject: [PATCH] Silencing the output from 7z so I can actually see what else the script is doing. Adding some clearer dubugging info for cleaning up folders --- scripts/build.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 863cd18..465a784 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -56,8 +56,13 @@ function Ensure-Executable ($command) { } function Delete-Existing ($path) { - Write-Verbose "Remove $path" + Write-Verbose "Removing $path in $(get-location)" Remove-Item -Recurse -force $path -ErrorAction SilentlyContinue + if(test-path $path -IsValid){ + Write-Verbose " Removed: $true" + } else { + Write-Verbose " Removed: $false" + } } # Check for archives that were not extracted correctly @@ -87,7 +92,7 @@ foreach ($s in $sources) { Delete-Existing $s.name Invoke-WebRequest -Uri $s.url -OutFile $tempArchive -ErrorAction Stop - Invoke-Expression "7z x -y -o$($s.name) $tempArchive" + Invoke-Expression "7z x -y -o$($s.name) $tempArchive > `$null" Remove-Item $tempArchive if ((Get-Childitem $s.name).Count -eq 1) {