Skip to content

Commit

Permalink
wrap original command in quotes inside of ()
Browse files Browse the repository at this point in the history
  • Loading branch information
crstamps2 committed May 30, 2023
1 parent 2ee2379 commit c1cd1a8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/shared.bash
Original file line number Diff line number Diff line change
Expand Up @@ -189,32 +189,32 @@ function build_image_override_file_with_version() {
function run_docker_compose() {
local command=(docker-compose)
if [[ "$(plugin_read_config CLI_VERSION "1")" == "2" ]] ; then
command="docker compose"
command=("docker compose")
echo "Command: ${command}"
fi

if [[ "$(plugin_read_config VERBOSE "false")" == "true" ]] ; then
command+=" --verbose"
command+=(--verbose)
echo "Command: ${command}"
fi

if [[ "$(plugin_read_config ANSI "true")" == "false" ]] ; then
command+=" --no-ansi"
command+=(--no-ansi)
echo "Command: ${command}"
fi

# Enable compatibility mode for v3 files
if [[ "$(plugin_read_config COMPATIBILITY "false")" == "true" ]]; then
command+=" --compatibility"
command+=(--compatibility)
echo "Command: ${command}"
fi

for file in $(docker_compose_config_files) ; do
command+=" --file ${file}"
command+=(--file "$file")
echo "Command: ${command}"
done

command+=" --project-name $(docker_compose_project_name)"
command+=(--project-name "$(docker_compose_project_name)")

echo "final command: ${command}"

Expand Down

0 comments on commit c1cd1a8

Please sign in to comment.