Hooks
- Removed the ability for hooks to add tasks, or modify tasks that are outside the context of the current event. This makes hooks a local mechanism that operates only on local changes. Modifications/additions coming in via sync command are not processed by hooks.
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# The on-exit event is triggered once, after all processing is complete, i.e.
|
||||
# last
|
||||
# The on-exit event is triggered once, after all processing is complete.
|
||||
# This hooks script has no effect on processing.
|
||||
|
||||
# Input:
|
||||
# - read-only line of JSON for each task added/modified
|
||||
|
||||
# Output:
|
||||
# - any emitted JSON is ignored
|
||||
# - all emitted non-JSON lines are considered feedback messages if the exit
|
||||
# code is zero, otherwise they are considered errors.
|
||||
|
||||
while read -t 1 modified_task
|
||||
# - Read-only line of JSON for each task added/modified
|
||||
while read modified_task
|
||||
do
|
||||
# Scan task
|
||||
echo $modified_task
|
||||
done
|
||||
|
||||
# Output:
|
||||
# - Optional feedback/error.
|
||||
echo 'on-exit'
|
||||
|
||||
# Status:
|
||||
# - 0: JSON ignored, non-JSON is feedback.
|
||||
# - non-0: JSON ignored, non-JSON is error.
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user