1commit 4de021d049a9b194da93d7e96ff12cc1cbabac83
2Author: Nicolas B. Pierron <nixos@nbp.name>
3Date: Sun Nov 16 15:19:38 2014 +0100
4
5 Use a template for taskwarrior install path.
6
7diff --git a/taskw/warrior.py b/taskw/warrior.py
8index 21dde88..e0509f2 100644
9--- a/taskw/warrior.py
10+++ b/taskw/warrior.py
11@@ -451,17 +451,17 @@ class TaskWarriorShellout(TaskWarriorBase):
12 def _execute(self, *args):
13 """ Execute a given taskwarrior command with arguments
14
15 Returns a 2-tuple of stdout and stderr (respectively).
16
17 """
18 command = (
19 [
20- 'task',
21+ '@@taskwarrior@@/bin/task',
22 'rc:%s' % self.config_filename,
23 ]
24 + self.get_configuration_override_args()
25 + [six.text_type(arg) for arg in args]
26 )
27
28 # subprocess is expecting bytestrings only, so nuke unicode if present
29 for i in range(len(command)):
30@@ -525,17 +525,17 @@ class TaskWarriorShellout(TaskWarriorBase):
31 except OSError:
32 # OSError is raised if subprocess.Popen fails to find
33 # the executable.
34 return False
35
36 @classmethod
37 def get_version(cls):
38 taskwarrior_version = subprocess.Popen(
39- ['task', '--version'],
40+ ['@@taskwarrior@@/bin/task', '--version'],
41 stdout=subprocess.PIPE
42 ).communicate()[0]
43 return LooseVersion(taskwarrior_version.decode())
44
45 def sync(self, init=False):
46 if self.get_version() < LooseVersion('2.3'):
47 raise UnsupportedVersionException(
48 "'sync' requires version 2.3 of taskwarrior or later."