Hooks: Add "version:" to hooks v2 arguments
- Saves a call to "task --version", potentially saving precious hook execution time. Useful for writing backwards compatible hooks in case of buggy Taskwarrior behavior.
This commit is contained in:
@@ -541,6 +541,9 @@ std::vector <std::string>& Hooks::buildHookScriptArgs (std::vector <std::string>
|
||||
// Directory containing *.data files.
|
||||
args.push_back ("data:" + context.data_dir._data);
|
||||
|
||||
// Taskwarrior version, same as returned by "task --version"
|
||||
args.push_back ("version:" + std::string(VERSION));
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user