summary refs log tree commit diff
path: root/pkgs/development/python-modules/taskw/use-template-for-taskwarrior-install-path.patch
blob: 006d964d4016b1f2c80376c7cf23d883366dc115 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
commit 4de021d049a9b194da93d7e96ff12cc1cbabac83
Author: Nicolas B. Pierron <nixos@nbp.name>
Date:   Sun Nov 16 15:19:38 2014 +0100

    Use a template for taskwarrior install path.

diff --git a/taskw/warrior.py b/taskw/warrior.py
index 21dde88..e0509f2 100644
--- a/taskw/warrior.py
+++ b/taskw/warrior.py
@@ -451,17 +451,17 @@ class TaskWarriorShellout(TaskWarriorBase):
     def _execute(self, *args):
         """ Execute a given taskwarrior command with arguments
 
         Returns a 2-tuple of stdout and stderr (respectively).
 
         """
         command = (
             [
-                'task',
+                '@@taskwarrior@@/bin/task',
                 'rc:%s' % self.config_filename,
             ]
             + self.get_configuration_override_args()
             + [six.text_type(arg) for arg in args]
         )
 
         # subprocess is expecting bytestrings only, so nuke unicode if present
         for i in range(len(command)):
@@ -525,17 +525,17 @@ class TaskWarriorShellout(TaskWarriorBase):
         except OSError:
             # OSError is raised if subprocess.Popen fails to find
             # the executable.
             return False
 
     @classmethod
     def get_version(cls):
         taskwarrior_version = subprocess.Popen(
-            ['task', '--version'],
+            ['@@taskwarrior@@/bin/task', '--version'],
             stdout=subprocess.PIPE
         ).communicate()[0]
         return LooseVersion(taskwarrior_version.decode())
 
     def sync(self, init=False):
         if self.get_version() < LooseVersion('2.3'):
             raise UnsupportedVersionException(
                 "'sync' requires version 2.3 of taskwarrior or later."