Critical Error text now as Notif Message

pull/263/head
KnifMelti 2023-01-25 22:27:01 +01:00
parent 713f2d5951
commit da5a01897d
1 changed files with 4 additions and 1 deletions

View File

@ -85,11 +85,14 @@ else {
#Test if there was a list_/winget_error #Test if there was a list_/winget_error
if (Test-Path "$WorkingDir\logs\error.txt") { if (Test-Path "$WorkingDir\logs\error.txt") {
$MessageType = "error" $MessageType = "error"
$Critical = Get-Content "$WorkingDir\logs\error.txt" -Raw
$Critical = $Critical.Substring(0, [Math]::Min($Critical.Length, 50))
$Message = "Critical:`n$Critical ..."
} }
else { else {
$MessageType = "success" $MessageType = "success"
$Message = $NotifLocale.local.outputs.output[9].message
} }
$Message = $NotifLocale.local.outputs.output[9].message
Start-NotifTask -Message $Message -MessageType $MessageType -Button1Text $Button1Text -Button1Action $OnClickAction -ButtonDismiss Start-NotifTask -Message $Message -MessageType $MessageType -Button1Text $Button1Text -Button1Action $OnClickAction -ButtonDismiss
} }
catch { catch {