- Added debug output on startup, if a hook script is found and does not have
  a valid name.
This commit is contained in:
Paul Beckingham 2015-01-07 22:54:55 -05:00
parent da6a57b203
commit 411fab3a27
9 changed files with 147 additions and 83 deletions

View file

@ -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)