@@ -102,7 +102,7 @@ def run_commit_hook(name: str, index: "IndexFile", *args: str) -> None:
102102 relative_hp = Path (hp ).relative_to (index .repo .working_dir ).as_posix ()
103103 cmd = ["bash.exe" , relative_hp ]
104104
105- cmd = subprocess .Popen (
105+ process = subprocess .Popen (
106106 cmd + list (args ),
107107 env = env ,
108108 stdout = subprocess .PIPE ,
@@ -116,13 +116,13 @@ def run_commit_hook(name: str, index: "IndexFile", *args: str) -> None:
116116 else :
117117 stdout_list : List [str ] = []
118118 stderr_list : List [str ] = []
119- handle_process_output (cmd , stdout_list .append , stderr_list .append , finalize_process )
119+ handle_process_output (process , stdout_list .append , stderr_list .append , finalize_process )
120120 stdout = "" .join (stdout_list )
121121 stderr = "" .join (stderr_list )
122- if cmd .returncode != 0 :
122+ if process .returncode != 0 :
123123 stdout = force_text (stdout , defenc )
124124 stderr = force_text (stderr , defenc )
125- raise HookExecutionError (hp , cmd .returncode , stderr , stdout )
125+ raise HookExecutionError (hp , process .returncode , stderr , stdout )
126126 # end handle return code
127127
128128
0 commit comments