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:
Wilhelm Schuermann 2015-04-02 09:18:34 +02:00
parent 229078ffed
commit 5487414003

View file

@ -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;
}