aboutsummaryrefslogtreecommitdiffstats
path: root/telegram-chat
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-02-01 10:55:28 +0100
committerGravatar Christian Hesse <mail@eworm.de>2023-02-01 11:29:56 +0100
commitc2cf05e9e59c60aa24e7d57d53b81c4b919b8495 (patch)
tree4a0e9081755fb80d616387f5de244a272c026bb0 /telegram-chat
parent44c30efbcd77f85a92595d06e4531fca1461f101 (diff)
telegram-chat: handle error in command...
Diffstat (limited to 'telegram-chat')
-rw-r--r--telegram-chat3
1 files changed, 2 insertions, 1 deletions
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";
}