Fix: preserve exit status of task
command (#3726)
This commit is contained in:
parent
3b0b4ffe66
commit
fa282d574d
@ -25,10 +25,10 @@
|
|||||||
[[ $QUTE_MODE == 'hints' ]] && title=$QUTE_SELECTED_TEXT || title=$QUTE_TITLE
|
[[ $QUTE_MODE == 'hints' ]] && title=$QUTE_SELECTED_TEXT || title=$QUTE_TITLE
|
||||||
|
|
||||||
# try to add the task and grab the output
|
# try to add the task and grab the output
|
||||||
if msg="$(task add "$title" "$*" 2>&1 | head -n 1)"; then
|
if msg="$(task add "$title" "$*" 2>&1)"; then
|
||||||
# annotate the new task with the url, send the output back to the browser
|
# annotate the new task with the url, send the output back to the browser
|
||||||
task +LATEST annotate "$QUTE_URL"
|
task +LATEST annotate "$QUTE_URL"
|
||||||
echo "message-info '$msg'" >> "$QUTE_FIFO"
|
echo "message-info '$msg'" | head -n 1 >> "$QUTE_FIFO"
|
||||||
else
|
else
|
||||||
echo "message-error '$msg'" >> "$QUTE_FIFO"
|
echo "message-error '$msg'" | head -n 1 >> "$QUTE_FIFO"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user