diff --git a/Compile.ps1 b/Compile.ps1 index 98257848..e011b6b5 100644 --- a/Compile.ps1 +++ b/Compile.ps1 @@ -125,10 +125,12 @@ Write-Progress -Activity "Compiling" -Completed Update-Progress -Activity "Validating" -StatusMessage "Checking winutil.ps1 Syntax" -Percent 0 try { - $null = Get-Command -Syntax .\winutil.ps1 + Get-Command -Syntax .\winutil.ps1 | Out-Null } catch { Write-Warning "Syntax Validation for 'winutil.ps1' has failed" Write-Host "$($Error[0])" -ForegroundColor Red + Pop-Location # Restore previous location before exiting... + exit 1 } Write-Progress -Activity "Validating" -Completed