Fix handling empty error messages

This commit is contained in:
Manuel Thalmann 2024-08-22 20:12:18 +02:00
parent d38dec6c66
commit 1a81aa9db7

View file

@ -141,7 +141,10 @@ $null = New-Module {
if (Test-Path $errorPath) {
$errorMessage = Get-Content $errorPath;
Remove-Item $errorPath;
Write-Error $errorMessage;
if ($errorMessage) {
Write-Error $errorMessage;
}
}
}