fix: test hook expansion

Signed-off-by: jolheiser <git@jolheiser.com>
main
jolheiser 2024-08-01 14:20:01 -05:00
parent 590777dea0
commit 00b0d91307
No known key found for this signature in database
1 changed files with 1 additions and 0 deletions

View File

@ -160,6 +160,7 @@ func requiredFS(repoDir string) error {
fi.WriteString("#!/usr/bin/env bash\n") fi.WriteString("#!/usr/bin/env bash\n")
fi.WriteString(fmt.Sprintf("%s pre-receive-hook\n", bin)) fi.WriteString(fmt.Sprintf("%s pre-receive-hook\n", bin))
fi.WriteString(fmt.Sprintf(`for hook in %s.d/*; do fi.WriteString(fmt.Sprintf(`for hook in %s.d/*; do
test -x "${hook}" && test -f "${hook}" || continue
"${hook}" "${hook}"
done`, fp)) done`, fp))
fi.Close() fi.Close()