TW-1587: Further improve example on-exit hook
- Initial patch was not quite right. on-exit _does_ receive added and modified tasks on STDIN, but is not allowed to return JSON.
This commit is contained in:
@@ -8,6 +8,8 @@
|
|||||||
to Ulf Eliasson).
|
to Ulf Eliasson).
|
||||||
- TW-1583 Invalid ID displayed for first report after done/delete (thanks to
|
- TW-1583 Invalid ID displayed for first report after done/delete (thanks to
|
||||||
Ulf Eliasson).
|
Ulf Eliasson).
|
||||||
|
- TW-1587 Fix and improve example on-exit hook, adjust to new hooks API
|
||||||
|
(thanks to Jochen Sprickerhof).
|
||||||
- Setting 'bulk' to zero is interpreted as infinity, which means there is no
|
- Setting 'bulk' to zero is interpreted as infinity, which means there is no
|
||||||
amount of changes that is considered dangerous (thanks to Tomas Babej).
|
amount of changes that is considered dangerous (thanks to Tomas Babej).
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,16 @@
|
|||||||
|
|
||||||
# Output:
|
# Output:
|
||||||
# - Optional feedback/error.
|
# - Optional feedback/error.
|
||||||
echo 'on-exit'
|
|
||||||
|
n=0
|
||||||
|
while read modified_task
|
||||||
|
do
|
||||||
|
n=$(($n + 1))
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "on-exit: Counted $n added/modified tasks."
|
||||||
|
|
||||||
# Status:
|
# Status:
|
||||||
# - 0: JSON ignored, non-JSON is feedback.
|
# - 0: Non-JSON is feedback.
|
||||||
# - non-0: JSON ignored, non-JSON is error.
|
# - non-0: Non-JSON is error.
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user