1
0
Fork 0
mirror of synced 2024-11-13 21:18:57 -05:00

switched to better function replacement

This commit is contained in:
Lamar Daughma 2022-01-28 17:30:18 +00:00
parent 9ed1af1fab
commit 69f6dbeebc

6
yadm
View file

@ -144,11 +144,7 @@ function main() {
[ ! -d "$YADM_WORK" ] && error_out "Work tree does not exist: [$YADM_WORK]"
HOOK_COMMAND="$YADM_COMMAND"
invoke_hook "pre"
if [[ "$YADM_COMMAND" =~ ^(echo)$ ]]; then
yecho "${YADM_ARGS[@]}"
else
$YADM_COMMAND "${YADM_ARGS[@]}"
fi
${YADM_COMMAND/echo/yecho} "${YADM_ARGS[@]}"
else
# any other commands are simply passed through to git
HOOK_COMMAND="$1"