mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Hooks
- Added debug output on startup, if a hook script is found and does not have a valid name.
This commit is contained in:
parent
da6a57b203
commit
411fab3a27
9 changed files with 147 additions and 83 deletions
|
@ -73,7 +73,17 @@ void Hooks::initialize ()
|
|||
{
|
||||
std::vector <std::string>::iterator i;
|
||||
for (i = _scripts.begin (); i != _scripts.end (); ++i)
|
||||
context.debug ("Found hook script " + *i);
|
||||
{
|
||||
Path p (*i);
|
||||
std::string name = p.name ();
|
||||
if (name.substr (0, 6) == "on-add" ||
|
||||
name.substr (0, 9) == "on-modify" ||
|
||||
name.substr (0, 9) == "on-launch" ||
|
||||
name.substr (0, 7) == "on-exit")
|
||||
context.debug ("Found hook script " + *i);
|
||||
else
|
||||
context.debug ("Found misnamed hook script " + *i);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (_debug >= 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue