From bdc6b23978f6af01139e622b78c752d095e3ea49 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Fri, 6 Oct 2023 22:57:28 -0400 Subject: [PATCH] fix(git) clean up shellcheck notices closes https://github.com/pkgxdev/pkgx/issues/784 --- projects/git-scm.org/git-shim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/git-scm.org/git-shim b/projects/git-scm.org/git-shim index 4bb16020..6749ef4d 100755 --- a/projects/git-scm.org/git-shim +++ b/projects/git-scm.org/git-shim @@ -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