mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Hooks
- Debug diagnostics now include exit status of hook script.
This commit is contained in:
parent
3f2df5a3b6
commit
0b6e94280e
1 changed files with 4 additions and 4 deletions
|
@ -266,8 +266,7 @@ int Hooks::execute (
|
|||
const std::string& input,
|
||||
std::string& output)
|
||||
{
|
||||
context.debug ("Hooks::execute " + command);
|
||||
|
||||
int status = -1;
|
||||
FILE* fp = popen (command.c_str (), "r+");
|
||||
if (fp)
|
||||
{
|
||||
|
@ -290,10 +289,11 @@ int Hooks::execute (
|
|||
}
|
||||
|
||||
fflush (fp);
|
||||
return pclose (fp);
|
||||
status = pclose (fp);
|
||||
context.debug (format ("Hooks::execute {1} (status {2})", command, status));
|
||||
}
|
||||
|
||||
return -1;
|
||||
return status;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue