2
0
Эх сурвалжийг харах

Merge pull request #5562 from startnow65/master

Detect docker compose version of form v2.x
Niklas Meyer 1 жил өмнө
parent
commit
9a5d8d2d22
2 өөрчлөгдсөн 3 нэмэгдсэн , 3 устгасан
  1. 2 2
      generate_config.sh
  2. 1 1
      update.sh

+ 2 - 2
generate_config.sh

@@ -26,7 +26,7 @@ for bin in openssl curl docker git awk sha1sum grep cut; do
 done
 done
 
 
 if docker compose > /dev/null 2>&1; then
 if docker compose > /dev/null 2>&1; then
-    if docker compose version --short | grep "^2." > /dev/null 2>&1; then
+    if docker compose version --short | grep -e "^2." -e "^v2." > /dev/null 2>&1; then
       COMPOSE_VERSION=native
       COMPOSE_VERSION=native
       echo -e "\e[33mFound Docker Compose Plugin (native).\e[0m"
       echo -e "\e[33mFound Docker Compose Plugin (native).\e[0m"
       echo -e "\e[33mSetting the DOCKER_COMPOSE_VERSION Variable to native\e[0m"
       echo -e "\e[33mSetting the DOCKER_COMPOSE_VERSION Variable to native\e[0m"
@@ -553,4 +553,4 @@ else
   echo -e "\e[33mCannot determine current git repository version...\e[0m"
   echo -e "\e[33mCannot determine current git repository version...\e[0m"
 fi
 fi
 
 
-detect_bad_asn
+detect_bad_asn

+ 1 - 1
update.sh

@@ -171,7 +171,7 @@ remove_obsolete_nginx_ports() {
 detect_docker_compose_command(){
 detect_docker_compose_command(){
 if ! [[ "${DOCKER_COMPOSE_VERSION}" =~ ^(native|standalone)$ ]]; then
 if ! [[ "${DOCKER_COMPOSE_VERSION}" =~ ^(native|standalone)$ ]]; then
   if docker compose > /dev/null 2>&1; then
   if docker compose > /dev/null 2>&1; then
-      if docker compose version --short | grep "2." > /dev/null 2>&1; then
+      if docker compose version --short | grep -e "^2." -e "^v2." > /dev/null 2>&1; then
         DOCKER_COMPOSE_VERSION=native
         DOCKER_COMPOSE_VERSION=native
         COMPOSE_COMMAND="docker compose"
         COMPOSE_COMMAND="docker compose"
         echo -e "\e[33mFound Docker Compose Plugin (native).\e[0m"
         echo -e "\e[33mFound Docker Compose Plugin (native).\e[0m"