mirror of
https://github.com/rgl/nexus-vagrant.git
synced 2026-10-04 18:53:55 +02:00
use Write-Host to dump the trap error
This commit is contained in:
@@ -10,9 +10,9 @@ Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
trap {
|
||||
Write-Output "ERROR: $_"
|
||||
Write-Output (($_.ScriptStackTrace -split '\r?\n') -replace '^(.*)$','ERROR: $1')
|
||||
Write-Output (($_.Exception.ToString() -split '\r?\n') -replace '^(.*)$','ERROR EXCEPTION: $1')
|
||||
Write-Host "ERROR: $_"
|
||||
($_.ScriptStackTrace -split '\r?\n') -replace '^(.*)$','ERROR: $1' | Write-Host
|
||||
($_.Exception.ToString() -split '\r?\n') -replace '^(.*)$','ERROR EXCEPTION: $1' | Write-Host
|
||||
Exit 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user