Critical Error text now as Notif Message
parent
713f2d5951
commit
da5a01897d
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue