mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-19 03:08:30 +08:00
* test -x is not enough https://stackoverflow.com/a/39489087
This commit is contained in:
@ -5,7 +5,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
|
||||
echo "${data}" | "${hook}"
|
||||
exitcodes="${exitcodes} $?"
|
||||
done
|
||||
|
@ -5,7 +5,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
|
||||
echo "${data}" | "${hook}"
|
||||
exitcodes="${exitcodes} $?"
|
||||
done
|
||||
|
@ -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
|
||||
|
@ -5,7 +5,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
|
||||
echo "${data}" | "${hook}"
|
||||
exitcodes="${exitcodes} $?"
|
||||
done
|
||||
|
@ -5,7 +5,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
|
||||
echo "${data}" | "${hook}"
|
||||
exitcodes="${exitcodes} $?"
|
||||
done
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user