code formatting
This commit is contained in:
parent
7ab62f2aea
commit
c3fd873495
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ function Invoke-Call {
|
||||||
[scriptblock]$ScriptBlock,
|
[scriptblock]$ScriptBlock,
|
||||||
[string]$ErrorAction = $ErrorActionPreference
|
[string]$ErrorAction = $ErrorActionPreference
|
||||||
)
|
)
|
||||||
& @ScriptBlock 2>&1 3>&1 4>&1| ForEach-Object { "$_" }
|
& @ScriptBlock 2>&1 3>&1 4>&1 | ForEach-Object { "$_" }
|
||||||
if (($lastexitcode -ne 0) -and $ErrorAction -eq "Stop") {
|
if (($lastexitcode -ne 0) -and $ErrorAction -eq "Stop") {
|
||||||
Write-Error "Command $ScriptBlock exited with $lastexitcode."
|
Write-Error "Command $ScriptBlock exited with $lastexitcode."
|
||||||
exit $lastexitcode
|
exit $lastexitcode
|
||||||
|
|
Loading…
Reference in a new issue