fix: correct arg parsing for git commands
This commit is contained in:
1 parent
91c8e62da5
commit
e50b941cee
1 file changed
+7
@@ -107,11 +107,18 @@ fi
|
||||
if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then
|
||||
export -n SSH_ORIGINAL_COMMAND
|
||||
exit_code=0
|
||||
if [[ $1 =~ git-* ]] || [[ $1 =~ git:* ]]; then
|
||||
set -f
|
||||
$0 $SSH_ORIGINAL_COMMAND
|
||||
exit_code=$?
|
||||
set +f
|
||||
else
|
||||
readarray -t -O "${#ssh_arg_array[@]}" ssh_arg_array < <( printf '%s' "$SSH_ORIGINAL_COMMAND" | xargs -n 1 )
|
||||
set -f
|
||||
$O "${ssh_arg_array[@]}"
|
||||
exit_code=$?
|
||||
set +f
|
||||
fi
|
||||
exit $exit_code
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user