commit 529845f7bad44e45a8197d83ce1cbdfab8679168 from: Jelmer Vernooij date: Wed Jul 06 22:58:43 2022 UTC Pass in appropriate relative path when executing hooks. commit - f901e842f31529258569bb4f3479b3c1913516ed commit + 529845f7bad44e45a8197d83ce1cbdfab8679168 blob - e920ab831bf1663734695d8fc9e477c0ee57e676 blob + a72cde13eacc974f797a5b996998b2f02c0d8adc --- dulwich/hooks.py +++ dulwich/hooks.py @@ -100,7 +100,9 @@ class ShellHook(Hook): args = self.pre_exec_callback(*args) try: - ret = subprocess.call([self.filepath] + list(args), cwd=self.cwd) + ret = subprocess.call( + [os.path.relpath(self.filepath, self.cwd)] + list(args), + cwd=self.cwd) if ret != 0: if self.post_exec_callback is not None: self.post_exec_callback(0, *args)