Skip to content

Commit

Permalink
Added support for docker-compose v2
Browse files Browse the repository at this point in the history
  • Loading branch information
alexaandrov committed Apr 14, 2023
1 parent 2a38a9c commit 502013e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function scr_install

local destination_path="/tmp"
local bin_path="/usr/local/bin"
local stitchocker_stable_release="1.0.1"
local stitchocker_stable_release="1.1.0"
local stitchoker_uri="https://raw.githubusercontent.com/alexaandrov/stitchocker/$stitchocker_stable_release/stitchocker.sh"
local stitchocker_name="stitchocker"
local stitchocker_tmp_path="$destination_path/$stitchocker_name.sh"
Expand Down
8 changes: 7 additions & 1 deletion stitchocker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,13 @@ function scr
local cmd_env=""
fi

local cmd="docker-compose $cmd_env -f $config_path $command $flags"
if docker compose version | grep "Docker Compose version" &> /dev/null; then
local docker_compose="docker compose"
elif docker-compose version | grep "Docker Compose version" &> /dev/null; then
local docker_compose="docker-compose"
fi

local cmd="$docker_compose $cmd_env -f $config_path $command $flags"

if [[ $debug == false ]]; then
if [[ $verbose == true ]]; then
Expand Down

0 comments on commit 502013e

Please sign in to comment.