switched to better function replacement
This commit is contained in:
parent
9ed1af1fab
commit
69f6dbeebc
1 changed files with 1 additions and 5 deletions
6
yadm
6
yadm
|
@ -144,11 +144,7 @@ function main() {
|
||||||
[ ! -d "$YADM_WORK" ] && error_out "Work tree does not exist: [$YADM_WORK]"
|
[ ! -d "$YADM_WORK" ] && error_out "Work tree does not exist: [$YADM_WORK]"
|
||||||
HOOK_COMMAND="$YADM_COMMAND"
|
HOOK_COMMAND="$YADM_COMMAND"
|
||||||
invoke_hook "pre"
|
invoke_hook "pre"
|
||||||
if [[ "$YADM_COMMAND" =~ ^(echo)$ ]]; then
|
${YADM_COMMAND/echo/yecho} "${YADM_ARGS[@]}"
|
||||||
yecho "${YADM_ARGS[@]}"
|
|
||||||
else
|
|
||||||
$YADM_COMMAND "${YADM_ARGS[@]}"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
# any other commands are simply passed through to git
|
# any other commands are simply passed through to git
|
||||||
HOOK_COMMAND="$1"
|
HOOK_COMMAND="$1"
|
||||||
|
|
Loading…
Reference in a new issue