- The 'diag' command should indicate misnamed hook scripts (thanks to Tomas
  Babej).
This commit is contained in:
Paul Beckingham 2015-01-07 18:43:14 -05:00
parent 235e4ef047
commit da6a57b203
2 changed files with 7 additions and 0 deletions

View file

@ -322,10 +322,15 @@ int CmdDiagnostics::execute (std::string& output)
for (h = hooks.begin (); h != hooks.end (); ++h)
{
Path p (*h);
std::string name = p.name ();
out << " "
<< *h
<< (p.executable () ? " (executable)" : " (not executable)")
<< (p.is_link () ? " (symlink)" : "")
<< ((name.substr (0, 6) == "on-add" ||
name.substr (0, 9) == "on-modify" ||
name.substr (0, 9) == "on-launch" ||
name.substr (0, 7) == "on-exit") ? "" : " (unrecognized hook name)")
<< "\n";
}
}