[PATCH v2 2/2] cli: add support for pre and post notmuch new hooks

Tom Prince tom.prince at ualberta.net
Sun Dec 4 11:54:58 PST 2011


On Sun, 04 Dec 2011 21:36:21 +0200, Jani Nikula <jani at nikula.org> wrote:
> > > +    if (run_hooks && !ret && !interrupted)
> > > +	ret = notmuch_run_hook (db_path, "post-new");
> > 
> > Does it matter at this point if the hook fails?  I'm not sure.
> 
> I wasn't sure either, but I ended up thinking that the hooks become part
> of 'notmuch new' and claiming success when a hook fails is not quite
> right. This might have importance if scripting 'notmuch new'.

One can always add 'exit 0' (perhaps with appropriate traps) to the hook
script, if you don't want failure to propagate to 'notmuch new', but not
the reverse.

  Tom


More information about the notmuch mailing list