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.
This commit is contained in:
4
todo.sh
4
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
|
||||
|
||||
Reference in New Issue
Block a user