From 6796263a7f7a8178f997ffddf635284e262d7f84 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 22 Aug 2024 20:12:18 +0200 Subject: [PATCH] Fix handling empty error messages --- scripts/Common/Scripts/Operations.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/Common/Scripts/Operations.ps1 b/scripts/Common/Scripts/Operations.ps1 index 94c218be..47b722a1 100644 --- a/scripts/Common/Scripts/Operations.ps1 +++ b/scripts/Common/Scripts/Operations.ps1 @@ -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; + } } }