- 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

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

View File

@@ -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";
} }
} }