Skip to content

Commit

Permalink
Update compose ps command to show container hash for DC v2 (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rick Peacock authored Apr 28, 2023
1 parent b945b60 commit 37ccd84
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/_base/harness/scripts/enable.sh.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ console_enabled()
if [ "$APP_BUILD" = dynamic ]; then
[ -f .my127ws/.flag-console-built ]
else
[ -n "$("${COMPOSE_BIN[@]}" ps --quiet console)" ]
[ -n "$("${COMPOSE_BIN[@]}" ps --quiet --all console)" ]
fi
}

Expand All @@ -21,12 +21,12 @@ enable_all()
HAS_FLAG=yes
IS_BUILT=yes
# If the containers no longer exist, we need to rebuild them
if [ -z "$("${COMPOSE_BIN[@]}" ps --quiet)" ]; then
if [ -z "$("${COMPOSE_BIN[@]}" ps --quiet --all)" ]; then
IS_BUILT=no
fi
fi

if [ "$APP_BUILD" = dynamic ] && console_enabled && [ -z "$("${COMPOSE_BIN[@]}" ps --quiet console)" ]; then
if [ "$APP_BUILD" = dynamic ] && console_enabled && [ -z "$("${COMPOSE_BIN[@]}" ps --quiet --all console)" ]; then
rm .my127ws/.flag-console-built
fi

Expand Down Expand Up @@ -64,7 +64,7 @@ enable_all()
}

enable_console() {
if [ "$APP_BUILD" = dynamic ] && console_enabled && [ -z "$("${COMPOSE_BIN[@]}" ps --quiet console)" ]; then
if [ "$APP_BUILD" = dynamic ] && console_enabled && [ -z "$("${COMPOSE_BIN[@]}" ps --quiet --all console)" ]; then
rm .my127ws/.flag-console-built
fi

Expand All @@ -77,7 +77,7 @@ dynamic_console()
{
if console_enabled; then
# ensure it is started
if [ -z "$("${COMPOSE_BIN[@]}" ps --quiet console)" ]; then
if [ -z "$("${COMPOSE_BIN[@]}" ps --quiet --all console)" ]; then
passthru "${COMPOSE_BIN[@]}" up -d console
fi
return;
Expand Down

0 comments on commit 37ccd84

Please sign in to comment.