Run hooks on MINGW* systems

MINGW* systems don't have a +x flag.
Everything is executable if it exists (as far as I know).

This, while trying to run hooks on MINGW* systems just check
for the existence of the file instead of -x
This commit is contained in:
addshore 2019-03-15 17:31:48 +00:00 committed by GitHub
parent 402b57880d
commit ec65801d9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

2
yadm
View File

@ -848,7 +848,7 @@ function invoke_hook() {
exit_status="$2"
hook_command="$YADM_DIR/hooks/${mode}_$HOOK_COMMAND"
if [ -x "$hook_command" ] ; then
if [ -x "$hook_command" ] || ( [[ $OPERATING_SYSTEM == MINGW* ]] && [ -f "$hook_command" ] ) ; then
debug "Invoking hook: $hook_command"
#; expose some internal data to all hooks