From ec65801d9b2101058ee48b39efe9aed0456a94f0 Mon Sep 17 00:00:00 2001 From: addshore Date: Fri, 15 Mar 2019 17:31:48 +0000 Subject: [PATCH] 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 --- yadm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yadm b/yadm index e57551f..0d1a7ed 100755 --- a/yadm +++ b/yadm @@ -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