You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/08/05 19:16:22 UTC

[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #1213: feat: support docker-compose command detect

tao12345666333 commented on code in PR #1213:
URL: https://github.com/apache/apisix-ingress-controller/pull/1213#discussion_r939157245


##########
test/e2e/testdata/wolf-rbac/cmd.sh:
##########
@@ -20,20 +20,26 @@
 cd test/e2e/testdata/wolf-rbac/
 
 OPTION=$1
+COMPOSE="docker-compose"
+
+if  ! command -v "docker-compose" > /dev/null; then
+	echo "docker-compose not found, try docker compose"
+    COMPOSE="docker compose"
+fi
 
 if  [ $OPTION = "ip" ]; then
     echo -n `docker inspect -f '{{range .NetworkSettings.Networks}}{{.Gateway}}{{end}}' wolf-server`
 elif [ $OPTION = "start" ]; then
-    docker-compose -f 'docker-compose.yaml'  -p 'wolf-rbac' down
+    eval "$COMPOSE -f 'docker-compose.yaml'  -p 'wolf-rbac' down"

Review Comment:
   We don't need "eval"



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org