From 90adeedc76015870bacbe292de6331d077307200 Mon Sep 17 00:00:00 2001 From: patrick-scho Date: Tue, 3 Jun 2025 14:51:28 +0200 Subject: [PATCH] add chmod to git-hooks/post-receive --- git-hooks/post-receive | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/git-hooks/post-receive b/git-hooks/post-receive index 2af01a8..2c425d7 100755 --- a/git-hooks/post-receive +++ b/git-hooks/post-receive @@ -24,5 +24,9 @@ for d in dirs: for f in files: # print the hook and write it to the git repo file = check(["git", "--no-pager", "show", f"{BRANCH}:{d}/{f}"]) - with open(f"/srv/git/{d}/hooks/{f}", "w") as fd: + + hookpath = f"/srv/git/{d}/hooks/{f}" + with open(hookpath, "w") as fd: fd.write(file) + + check(["chmod", "+x", hookpath]) -- 2.50.1