refactor: reparse the original ssh command in the hopes of keeping array arguments in place
This commit is contained in:
19
dokku
19
dokku
@@ -107,19 +107,12 @@ fi
|
|||||||
if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then
|
if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then
|
||||||
export -n SSH_ORIGINAL_COMMAND
|
export -n SSH_ORIGINAL_COMMAND
|
||||||
exit_code=0
|
exit_code=0
|
||||||
if [[ $1 =~ git-* ]] || [[ $1 =~ git:* ]]; then
|
readarray -t -O "${#ssh_arg_array[@]}" ssh_arg_array < <( printf '%s' "$SSH_ORIGINAL_COMMAND" | xargs -n 1 )
|
||||||
set -f
|
set -f
|
||||||
$0 $SSH_ORIGINAL_COMMAND
|
$O "${ssh_arg_array[@]}"
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
set +f
|
set +f
|
||||||
exit $?
|
exit $exit_code
|
||||||
else
|
|
||||||
set -f
|
|
||||||
xargs $0 <<<$SSH_ORIGINAL_COMMAND
|
|
||||||
exit_code=$?
|
|
||||||
set +f
|
|
||||||
exit $exit_code
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! dokku_auth "$@"; then
|
if ! dokku_auth "$@"; then
|
||||||
|
|||||||
Reference in New Issue
Block a user