at master 3.1 kB view raw
1diff --git a/git_annex_adapter/process.py b/git_annex_adapter/process.py 2index 6ddb985..bbd0ab8 100644 3--- a/git_annex_adapter/process.py 4+++ b/git_annex_adapter/process.py 5@@ -389,7 +389,7 @@ class GitAnnexBatchProcess: 6 _procclass = Process 7 8 def __init__(self, args, workdir): 9- self.args = ('git', 'annex', *args) 10+ self.args = ('@gitAnnex@', *args) 11 self.workdir = workdir 12 self._process = None 13 self._dead_process = None 14@@ -586,7 +586,7 @@ class ProcessRunner: 15 class GitAnnexRunner(ProcessRunner): 16 """Helper class to run git-annex commands.""" 17 def __init__(self, args_prefix, workdir): 18- args_prefix = ('git-annex', *args_prefix) 19+ args_prefix = ('@gitAnnex@', *args_prefix) 20 super().__init__(args_prefix, workdir) 21 22 def __call__(self, *args_suffix): 23diff --git a/tests/test_process.py b/tests/test_process.py 24index ed619bb..9335078 100644 25--- a/tests/test_process.py 26+++ b/tests/test_process.py 27@@ -181,7 +181,7 @@ class TestProcessOnEmptyAnnex(TempAnnexTestCase): 28 def test_process_annex_metadata_batch(self): 29 """Process should be able to read one line""" 30 with Process( 31- ['git', 'annex', 'metadata', '--batch', '--json'], 32+ ['@gitAnnex@', 'metadata', '--batch', '--json'], 33 str(self.tempdir), 34 ) as proc: 35 proc.writeline( 36@@ -202,7 +202,7 @@ class TestProcessOnEmptyAnnex(TempAnnexTestCase): 37 def test_jsonprocess_annex_metadata_batch(self): 38 """JsonProcess should encode and decode properly""" 39 with JsonProcess( 40- ['git', 'annex', 'metadata', '--batch', '--json'], 41+ ['@gitAnnex@', 'metadata', '--batch', '--json'], 42 str(self.tempdir), 43 ) as proc: 44 obj = proc({'key':'SHA256E-s0--0'}) 45@@ -218,7 +218,7 @@ class TestProcessOnEmptyAnnex(TempAnnexTestCase): 46 def test_process_annex_info_batch(self): 47 """Process should be able to read multiple lines""" 48 with Process( 49- ['git', 'annex', 'info', '--batch'], 50+ ['@gitAnnex@', 'info', '--batch'], 51 str(self.tempdir), 52 ) as proc: 53 proc.writeline('here') 54diff --git a/tests/utils.py b/tests/utils.py 55index 281ee3f..969aedc 100644 56--- a/tests/utils.py 57+++ b/tests/utils.py 58@@ -107,7 +107,7 @@ class TempAnnexTestCase(TempRepoTestCase): 59 # Have to uninit before cleaning directory, since git-annex 60 # marks its objects read-only so that they don't get deleted. 61 subprocess.run( 62- ['git', 'annex', 'uninit'], 63+ ['@gitAnnex@', 'uninit'], 64 cwd=self.repo.workdir, 65 stdout=subprocess.PIPE, 66 stderr=subprocess.PIPE, 67@@ -122,7 +122,7 @@ class TempAnnexTestCase(TempRepoTestCase): 68 path.write_text(text) 69 70 subprocess.run( 71- ['git', 'annex', 'add', '--quiet', relpath], 72+ ['@gitAnnex@', 'add', '--quiet', relpath], 73 cwd=self.repo.workdir, 74 check=True, 75 )