Fix handling empty error messages
This commit is contained in:
parent
3ee928c081
commit
e294564e92
1 changed files with 4 additions and 1 deletions
|
@ -141,9 +141,12 @@ $null = New-Module {
|
||||||
if (Test-Path $errorPath) {
|
if (Test-Path $errorPath) {
|
||||||
$errorMessage = Get-Content $errorPath;
|
$errorMessage = Get-Content $errorPath;
|
||||||
Remove-Item $errorPath;
|
Remove-Item $errorPath;
|
||||||
|
|
||||||
|
if ($errorMessage) {
|
||||||
Write-Error $errorMessage;
|
Write-Error $errorMessage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# ToDo: Store Run-OneShot and Receive-OneShot somewhere else in Windows folder
|
# ToDo: Store Run-OneShot and Receive-OneShot somewhere else in Windows folder
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue