buckket / twtxt

Decentralised, minimalist microblogging service for hackers.
http://twtxt.readthedocs.org/en/stable/
MIT License
1.94k stars 79 forks source link

Pre/post hooks should check return value #85

Closed kdave closed 8 years ago

kdave commented 8 years ago

post_tweet_hook = /bin/false followed by 'twxtxt tweet' succeeds, no messages. While the current semantics don't specify the behaviour, I'd expect that there should be some way how to get the feedback from the hooks. Possible semantics:

buckket commented 8 years ago

For now this should do: https://github.com/buckket/twtxt/commit/59c7aec517e03c516e682d449b1ba04c85a0e689

Maybe we should print stdout/stderr in case the return value is non-zero, as you suggested.

kdave commented 8 years ago

Works for me, thanks.

buckket commented 8 years ago

if post/pre _tweet_hook returns with nonzero code, print the stdout/stderr

Implemented.