Skip to content

Commit

Permalink
[Docker] Fixed multi-argument commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunderberg committed Aug 6, 2021
1 parent ac5637b commit e856608
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docker/bash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ while (( $# )); do

--)
shift
COMMAND="$@"
COMMAND=( "$@" )
break
;;

Expand All @@ -197,7 +197,7 @@ while (( $# )); do
DOCKER_IMAGE_NAME=$1
shift
else
COMMAND="$@"
COMMAND=( "$@" )
break
fi
;;
Expand All @@ -209,7 +209,7 @@ if [[ -z "${DOCKER_IMAGE_NAME}" ]]; then
show_usage >&2
fi

if [[ "${COMMAND}" = bash ]]; then
if [[ "${COMMAND[@]}" = bash ]]; then
INTERACTIVE=true
USE_NET_HOST=true
fi
Expand Down Expand Up @@ -363,8 +363,6 @@ DOCKER_CMD=(${DOCKER_BINARY} run
"${COMMAND[@]}"
)

echo "TEMP = " "${DOCKER_CMD[@]}"

if ${DRY_RUN}; then
echo "${DOCKER_CMD[@]}"
else
Expand Down

0 comments on commit e856608

Please sign in to comment.