X-Git-Url: https://git.ralfj.de/git-mirror.git/blobdiff_plain/91149b3b918cfe8d95e261ad8ce7607606e98ba3..2b00eaa147818ccfd68a1466d28c41995accef7d:/git_mirror.py diff --git a/git_mirror.py b/git_mirror.py index 23f6545..12075bf 100644 --- a/git_mirror.py +++ b/git_mirror.py @@ -177,7 +177,7 @@ class Repo: # Now run the post-receive hooks. This will *also* push the changes to all mirrors, as we # are one of these hooks! os.putenv("GIT_MIRROR_SOURCE", mirror) # tell ourselves which repo we do *not* have to update - with subprocess.Popen(['/bin/sh', 'hooks/post-receive'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) as p: + with subprocess.Popen(['hooks/post-receive'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) as p: (stdout, stderr) = p.communicate("{} {} {}\n".format(oldsha, newsha, ref).encode('utf-8')) stdout = stdout.decode('utf-8') if p.returncode: