From b7757b51b16166686fc8db5243e151ebf0355a8c Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Fri, 23 Oct 2020 03:58:55 +0200 Subject: [PATCH] Fix `abra run` if there are 2 containers up --- abra | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abra b/abra index 2351e2d..1575903 100755 --- a/abra +++ b/abra @@ -250,7 +250,7 @@ sub_run(){ fi CONTAINER=$(docker container ls --format "table {{.ID}},{{.Names}}" \ - | grep "${STACK_NAME}_${SERVICE}" | cut -d',' -f1) + | grep "${STACK_NAME}_${SERVICE}" | head -n1 | cut -d',' -f1) if [ -z "$CONTAINER" ]; then error "Can't find a container for ${STACK_NAME}_${SERVICE}"