From 924182e12c9d45e32308c40809792af3aa0ea037 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 17 May 2014 14:25:02 -0400 Subject: [PATCH] Diagnostics - Now displays all installed hook scripts, with executable/symlink status. --- src/commands/CmdDiagnostics.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/commands/CmdDiagnostics.cpp b/src/commands/CmdDiagnostics.cpp index 759ffb6b5..4ba628cd8 100644 --- a/src/commands/CmdDiagnostics.cpp +++ b/src/commands/CmdDiagnostics.cpp @@ -271,7 +271,24 @@ int CmdDiagnostics::execute (std::string& output) out << bold.colorize (STRING_CMD_DIAG_HOOKS) << "\n"; - out << "\n\n"; + std::vector hooks = context.hooks.list (); + if (hooks.size ()) + { + std::vector ::iterator h; + for (h = hooks.begin (); h != hooks.end (); ++h) + { + Path p (*h); + out << " " + << *h + << (p.executable () ? " (executable)" : " (not executable)") + << (p.is_link () ? " (symlink)" : "") + << "\n"; + } + } + else + out << " (none)\n"; + + out << "\n"; // Verify UUIDs are all unique. out << bold.colorize (STRING_CMD_DIAG_TESTS)