mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-25 21:27:19 +02:00
Hooks
- The 'diag' command should indicate misnamed hook scripts (thanks to Tomas Babej).
This commit is contained in:
parent
235e4ef047
commit
da6a57b203
2 changed files with 7 additions and 0 deletions
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue