mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
fix(git)
clean up shellcheck notices closes https://github.com/pkgxdev/pkgx/issues/784
This commit is contained in:
parent
174bdc9b22
commit
bdc6b23978
1 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,7 @@ find_git_command() {
|
|||
case $arg in
|
||||
-*);;
|
||||
*)
|
||||
echo $arg
|
||||
echo "$arg"
|
||||
return # found the command!
|
||||
esac
|
||||
done
|
||||
|
@ -20,12 +20,12 @@ cmd=$(find_git_command "$@")
|
|||
|
||||
if [ -z "$cmd" ]; then
|
||||
exec "$libexec/git" "$@"
|
||||
elif [ -x "$libexec/git-$_CMD" -a -f "$libexec/git-$cmd" ]; then
|
||||
elif [ -x "$libexec/git-$cmd" ] && [ -f "$libexec/git-$cmd" ]; then
|
||||
exec "$libexec/git" "$@"
|
||||
elif type "git-$cmd" >/dev/null 2>&1; then
|
||||
exec "$libexec/git" "$@"
|
||||
elif command -v pkgx >/dev/null 2>&1 && pkg=$(pkgx --provider git-$cmd); then
|
||||
exec pkgx +$pkg "$libexec/git" "$@"
|
||||
elif command -v pkgx >/dev/null 2>&1 && pkg=$(pkgx --provider git-"$cmd"); then
|
||||
exec pkgx +"$pkg" "$libexec/git" "$@"
|
||||
else
|
||||
exec "$libexec/git" "$@"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue