Browse Source

new: adding ``--quiet|-q`` as a quick solution to allow removing any bogus logs from ``stdout``.

Main issue is to be able to use actions for instance and use their
output in other scripts.
hostresources
Valentin Lab 5 years ago
parent
commit
e870a127e2
  1. 10
      bin/compose-core

10
bin/compose-core

@ -1467,7 +1467,7 @@ run_service_hook () {
MASTER_BASE_CHARM_NAME=$(get_service_charm "$MASTER_BASE_SERVICE_NAME") || return 1
DOCKER_BASE_IMAGE=$(service_base_docker_image "$MASTER_BASE_SERVICE_NAME") || return 1
Wrap -d "running $YELLOW$action$NORMAL hook of $DARKYELLOW$subservice$NORMAL in charm $DARKPINK$charm$NORMAL" <<EOF || return 1
Wrap "${wrap_opts[@]}" -d "running $YELLOW$action$NORMAL hook of $DARKYELLOW$subservice$NORMAL in charm $DARKPINK$charm$NORMAL" <<EOF || return 1
export DOCKER_BASE_IMAGE="$DOCKER_BASE_IMAGE"
export SERVICE_NAME=$subservice
@ -2517,7 +2517,7 @@ run_service_relations () {
RELATION_TARGET_COMPOSE_DEF=$(get_compose_service_def "$target_service") || return 1
export RELATION_TARGET_COMPOSE_DEF MASTER_TARGET_{CHARM,SERVICE}_NAME
Wrap -d "Building $DARKYELLOW$subservice$NORMAL --$DARKBLUE$relation_name$NORMAL--> $DARKYELLOW$target_service$NORMAL" <<EOF || return 1
Wrap "${wrap_opts[@]}" -d "Building $DARKYELLOW$subservice$NORMAL --$DARKBLUE$relation_name$NORMAL--> $DARKYELLOW$target_service$NORMAL" <<EOF || return 1
_run_service_relation "$relation_name" "$subservice" "$target_service" "\$relation_config"
EOF
done < <(get_service_relations "$subservice") || return 1
@ -3487,6 +3487,7 @@ display_help() {
echo " --dirs Display data dirs and quit"
echo " (ignoring any other options)"
echo " -v, --verbose Be more verbose"
echo " -q, --quiet Be quiet"
echo " -d, --debug Print full debugging information (sets also verbose)"
echo " --dry-compose-run If docker-compose will be run, only print out what"
echo " command line will be used."
@ -3713,6 +3714,7 @@ mkdir -p "$CACHEDIR" || exit 1
## Argument parsing
##
wrap_opts=()
services=()
remainder_args=()
compose_opts=()
@ -3741,6 +3743,10 @@ while read-0 arg; do
export VERBOSE=true
compose_opts+=("--verbose")
;;
--quiet|-q)
export QUIET=true
export wrap_opts+=("-q")
;;
--version|-V)
print_version
docker-compose --version

Loading…
Cancel
Save