mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Extensions: Implemented ::callExtension
This commit is contained in:
parent
98f058fb0c
commit
8f29030d01
1 changed files with 7 additions and 0 deletions
|
@ -27,6 +27,7 @@
|
|||
#include <cmake.h>
|
||||
#include <Extensions.h>
|
||||
#include <FS.h>
|
||||
#include <shared.h>
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
|
||||
|
@ -69,7 +70,13 @@ int Extensions::callExtension (
|
|||
const std::vector <std::string>& input,
|
||||
std::vector <std::string>& output) const
|
||||
{
|
||||
auto inputStr = join ("\n", input);
|
||||
|
||||
// Measure time for each hook if running in debug
|
||||
int status = 0;
|
||||
std::string outputStr;
|
||||
status = execute (script, {}, inputStr, outputStr);
|
||||
output = split (outputStr, '\n');
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue