1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Avoiding directory execution on hook (#10954) (#10955)

* test -x is not enough https://stackoverflow.com/a/39489087
This commit is contained in:
Vasil Mikhalenya
2020-04-04 19:29:58 +03:00
committed by GitHub
parent 2a06d3a590
commit 240258a3e5
7 changed files with 9 additions and 9 deletions

View File

@@ -4,7 +4,7 @@ hookname=$(basename $0)
GIT_DIR=${GIT_DIR:-$(dirname $0)}
for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do
test -x "${hook}" || continue
test -x "${hook}" && test -f "${hook}" || continue
"${hook}" $1 $2 $3
exitcodes="${exitcodes} $?"
done