From 38e2b8847f9115638a397bf039b41c212f5e44f9 Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Tue, 29 Jun 2010 11:07:40 +0200 Subject: [PATCH] BUG: Failure of custom actions is not reflected in todo.sh exit status. No further actions are done after cleanup() calls, so the change from "exit" to "return" is safe. Further refactoring of the cleanup() calls is pending. --- todo.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/todo.sh b/todo.sh index 9e54ee8..6dc42a2 100755 --- a/todo.sh +++ b/todo.sh @@ -250,7 +250,7 @@ die() cleanup() { [ -f "$TMP_FILE" ] && rm "$TMP_FILE" - exit 0 + return 0 } cleaninput() @@ -620,7 +620,9 @@ then elif [ -d "$TODO_ACTIONS_DIR" -a -x "$TODO_ACTIONS_DIR/$action" ] then "$TODO_ACTIONS_DIR/$action" "$@" + status=$? cleanup + exit $status fi ## Only run if $action isn't found in .todo.actions.d