Hooks
- The 'diag' command should indicate misnamed hook scripts (thanks to Tomas Babej).
This commit is contained in:
@@ -7,6 +7,8 @@
|
|||||||
- Changed assorted reports so they do not use '.age' format for dates that are
|
- Changed assorted reports so they do not use '.age' format for dates that are
|
||||||
in the future, because those are never shown with this format (thanks to
|
in the future, because those are never shown with this format (thanks to
|
||||||
Sujeevan Vijayakumaran).
|
Sujeevan Vijayakumaran).
|
||||||
|
- The 'diag' command should indicate misnamed hook scripts (thanks to Tomas
|
||||||
|
Babej).
|
||||||
|
|
||||||
------ current release ---------------------------
|
------ current release ---------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -322,10 +322,15 @@ int CmdDiagnostics::execute (std::string& output)
|
|||||||
for (h = hooks.begin (); h != hooks.end (); ++h)
|
for (h = hooks.begin (); h != hooks.end (); ++h)
|
||||||
{
|
{
|
||||||
Path p (*h);
|
Path p (*h);
|
||||||
|
std::string name = p.name ();
|
||||||
out << " "
|
out << " "
|
||||||
<< *h
|
<< *h
|
||||||
<< (p.executable () ? " (executable)" : " (not executable)")
|
<< (p.executable () ? " (executable)" : " (not executable)")
|
||||||
<< (p.is_link () ? " (symlink)" : "")
|
<< (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";
|
<< "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user