소스 검색

Pass in appropriate relative path when executing hooks.

Jelmer Vernooij 2 년 전
부모
커밋
529845f7ba
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      dulwich/hooks.py

+ 3 - 1
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)