Skip to content

Commit 0c2ddbe

Browse files
authored
Fix docker inspect command for test container exit code
1 parent 3e6c838 commit 0c2ddbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker_compose_test/docker_compose_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ echo "$docker_compose_up_cmd" | bash
7272
result=$?
7373

7474
# Figure out the exit code of the test container incase it never actually started.
75-
EXIT_CODE=$(docker inspect $(docker compose -f $ABSOLUTE_COMPOSE_FILE_PATH ps -qa $DOCKER_COMPOSE_TEST_CONTAINER) --format='{{.State.ExitCode}}' 2>/dev/null)
75+
EXIT_CODE=$(docker inspect $($docker_compose_bin -f $ABSOLUTE_COMPOSE_FILE_PATH ps -qa $DOCKER_COMPOSE_TEST_CONTAINER) --format='{{.State.ExitCode}}' 2>/dev/null)
7676
if [ "$EXIT_CODE" != "0" ] || [ -z "$EXIT_CODE" ]; then
7777
echo "Error: $DOCKER_COMPOSE_TEST_CONTAINER container failed or never started!"
7878
exit 1

0 commit comments

Comments
 (0)