Skip to content

Commit d9ce48c

Browse files
committed
telegram-chat: handle error in command...
1 parent 0f612a8 commit d9ce48c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

telegram-chat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ $WaitFullyConnected;
100100
:local File ("tmpfs/telegram-chat/" . [ $GetRandom20CharAlNum 6 ]);
101101
$MkDir "tmpfs/telegram-chat";
102102
$LogPrintExit2 info $0 ("Running command: " . $Text) false;
103-
:exec script=($Text . "; :execute script=\":put\" file=" . $File . ".done") file=$File;
103+
:exec script=(":do {\n" . $Text . "\n} on-error={};" . \
104+
":execute script=\":put\" file=" . $File . ".done") file=$File;
104105
:if ([ $WaitForFile ($File . ".done.txt") 200 ] = false) do={
105106
:set State "The command did not finish, still running in background.\n\n";
106107
}

0 commit comments

Comments
 (0)