From c2cf05e9e59c60aa24e7d57d53b81c4b919b8495 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 1 Feb 2023 10:55:28 +0100 Subject: telegram-chat: handle error in command... --- telegram-chat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/telegram-chat b/telegram-chat index aeb4e6d..2f60a62 100644 --- a/telegram-chat +++ b/telegram-chat @@ -100,7 +100,8 @@ $WaitFullyConnected; :local File ("tmpfs/telegram-chat/" . [ $GetRandom20CharAlNum 6 ]); $MkDir "tmpfs/telegram-chat"; $LogPrintExit2 info $0 ("Running command: " . $Text) false; - :exec script=($Text . "; :execute script=\":put\" file=" . $File . ".done") file=$File; + :exec script=(":do {\n" . $Text . "\n} on-error={};" . \ + ":execute script=\":put\" file=" . $File . ".done") file=$File; :if ([ $WaitForFile ($File . ".done.txt") 200 ] = false) do={ :set State "The command did not finish, still running in background.\n\n"; } -- cgit v1.2.3-70-g09d2