Browse Source

fix: any output of compose was redirected to standard error.

hostresources
Valentin Lab 6 years ago
parent
commit
3760343dbc
  1. 42
      bin/compose-core

42
bin/compose-core

@ -3107,26 +3107,28 @@ launch_docker_compose() {
{ {
{ {
if [ -z "$COMPOSE_DISABLE_DOCKER_COMPOSE_STORE" ]; then
cd "/var/lib/compose/docker-compose/$sha/$project"
else
cd "$docker_compose_dir"
fi
if [ -f ".env" ]; then
debug "${WHITE}.env$NORMAL for $DARKYELLOW$SERVICE_PACK$NORMAL:"
debug "$(cat ".env" | prefix " $GRAY|$NORMAL ")"
fi
debug "${WHITE}docker-compose.yml$NORMAL for $DARKYELLOW$SERVICE_PACK$NORMAL:"
debug "$(cat "docker-compose.yml" | prefix " $GRAY|$NORMAL ")"
debug "${WHITE}Launching$NORMAL: docker-compose $@"
if [ "$DRY_COMPOSE_RUN" ]; then
echo docker-compose "$@"
else
docker-compose "$@"
fi
echo "$?" > "$docker_compose_dir/.data/errlvl"
} | _save stdout
} 3>&1 1>&2 2>&3 | _save stderr 3>&1 1>&2 2>&3
{
if [ -z "$COMPOSE_DISABLE_DOCKER_COMPOSE_STORE" ]; then
cd "/var/lib/compose/docker-compose/$sha/$project"
else
cd "$docker_compose_dir"
fi
if [ -f ".env" ]; then
debug "${WHITE}.env$NORMAL for $DARKYELLOW$SERVICE_PACK$NORMAL:"
debug "$(cat ".env" | prefix " $GRAY|$NORMAL ")"
fi
debug "${WHITE}docker-compose.yml$NORMAL for $DARKYELLOW$SERVICE_PACK$NORMAL:"
debug "$(cat "docker-compose.yml" | prefix " $GRAY|$NORMAL ")"
debug "${WHITE}Launching$NORMAL: docker-compose $@"
if [ "$DRY_COMPOSE_RUN" ]; then
echo docker-compose "$@"
else
docker-compose "$@"
fi
echo "$?" > "$docker_compose_dir/.data/errlvl"
} | _save stdout
} 3>&1 1>&2 2>&3 | _save stderr
} 3>&1 1>&2 2>&3
if tail -n 1 "$docker_compose_dir/.data/stderr" | egrep "Service .+ failed to build: Error getting container [0-9a-f]+ from driver devicemapper: (open|Error mounting) /dev/mapper/docker-.*: no such file or directory$" >/dev/null 2>&1; then if tail -n 1 "$docker_compose_dir/.data/stderr" | egrep "Service .+ failed to build: Error getting container [0-9a-f]+ from driver devicemapper: (open|Error mounting) /dev/mapper/docker-.*: no such file or directory$" >/dev/null 2>&1; then
err "Detected bug https://github.com/docker/docker/issues/4036 ... " err "Detected bug https://github.com/docker/docker/issues/4036 ... "
err "Please re-launch your command, or switch from 'devicemapper' driver to 'overlayfs' or 'aufs'." err "Please re-launch your command, or switch from 'devicemapper' driver to 'overlayfs' or 'aufs'."

Loading…
Cancel
Save