2
0
Fork 0

sh.zio.backup: fix weirdness with non-stderr messages

main
Ducky 2024-04-02 01:01:59 +01:00
parent b2aed7f621
commit 5d5c7b02a7
1 changed files with 3 additions and 1 deletions

View File

@ -157,7 +157,7 @@ function invoke_script() {
function trigger_notify() { function trigger_notify() {
level="$1" level="$1"
title="$2" title="$2"
message="$(echo "$3" | sed -r "s/\x1B\[[0-9;]*[JKmsu]//g")" message="$3"
log_path="$4" log_path="$4"
notify_prog="/usr/local/bin/sh.zio.notify" notify_prog="/usr/local/bin/sh.zio.notify"
@ -185,6 +185,8 @@ function trigger_notify() {
--message "$message" \ --message "$message" \
--title "$title" --title "$title"
else else
message="$(echo "$3" | sed -r "s/\x1B\[[0-9;]*[JKmsu]//g")"
"$notify_prog" \ "$notify_prog" \
--file "$log_path" \ --file "$log_path" \
--invoked-by "$(basename $me_filename)" \ --invoked-by "$(basename $me_filename)" \