feat: ensure the dokku binary respects the quiet flag
Previously, there were many headers being output that were unable to be removed via the --quiet flag.
This commit is contained in:
24
dokku
24
dokku
@@ -191,20 +191,20 @@ case "$1" in
|
|||||||
done
|
done
|
||||||
|
|
||||||
# New lines are blank echos for readability
|
# New lines are blank echos for readability
|
||||||
echo "Usage: dokku [--quiet|--trace|--rm-container|--rm|--force] COMMAND <app> [command-specific-options]"
|
dokku_log_quiet "Usage: dokku [--quiet|--trace|--rm-container|--rm|--force] COMMAND <app> [command-specific-options]"
|
||||||
echo ""
|
dokku_log_quiet ""
|
||||||
echo "Primary help options, type \"dokku COMMAND:help\" for more details, or dokku help --all to see all commands."
|
dokku_log_quiet "Primary help options, type \"dokku COMMAND:help\" for more details, or dokku help --all to see all commands."
|
||||||
echo ""
|
dokku_log_quiet ""
|
||||||
echo "Commands:"
|
dokku_log_quiet "Commands:"
|
||||||
echo ""
|
dokku_log_quiet ""
|
||||||
|
|
||||||
if [[ "$2" == "--all" ]] ; then
|
if [[ "$2" == "--all" ]] ; then
|
||||||
for core_plugin_command in $CORE_PLUGIN_COMMANDS; do
|
for core_plugin_command in $CORE_PLUGIN_COMMANDS; do
|
||||||
$core_plugin_command help
|
$core_plugin_command help
|
||||||
done | sort | column -c2 -t -s,
|
done | sort | column -c2 -t -s,
|
||||||
echo ""
|
dokku_log_quiet ""
|
||||||
echo "Community plugin commands:"
|
dokku_log_quiet "Community plugin commands:"
|
||||||
echo ""
|
dokku_log_quiet ""
|
||||||
for community_plugin_command in $COMMUNITY_PLUGIN_COMMANDS; do
|
for community_plugin_command in $COMMUNITY_PLUGIN_COMMANDS; do
|
||||||
$community_plugin_command help
|
$community_plugin_command help
|
||||||
done | sort | column -c2 -t -s,
|
done | sort | column -c2 -t -s,
|
||||||
@@ -214,9 +214,9 @@ case "$1" in
|
|||||||
# When done, sort, sed cuts arugments out of strings and colum make it pretty
|
# When done, sort, sed cuts arugments out of strings and colum make it pretty
|
||||||
done | sort | sed -e '/^.*:/d' -e 's/\s[\[\<\-\(].*,/,/' | column -c2 -t -s,
|
done | sort | sed -e '/^.*:/d' -e 's/\s[\[\<\-\(].*,/,/' | column -c2 -t -s,
|
||||||
if [[ -n "$COMMUNITY_PLUGIN_COMMANDS" ]]; then
|
if [[ -n "$COMMUNITY_PLUGIN_COMMANDS" ]]; then
|
||||||
echo ""
|
dokku_log_quiet ""
|
||||||
echo "Community plugin commands:"
|
dokku_log_quiet "Community plugin commands:"
|
||||||
echo ""
|
dokku_log_quiet ""
|
||||||
for community_plugin_command in $COMMUNITY_PLUGIN_COMMANDS; do
|
for community_plugin_command in $COMMUNITY_PLUGIN_COMMANDS; do
|
||||||
$community_plugin_command help
|
$community_plugin_command help
|
||||||
done | sort | column -c2 -t -s,
|
done | sort | column -c2 -t -s,
|
||||||
|
|||||||
@@ -16,6 +16,13 @@ dokku_apps() {
|
|||||||
[[ $INSTALLED_APPS ]] && echo "$INSTALLED_APPS"
|
[[ $INSTALLED_APPS ]] && echo "$INSTALLED_APPS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dokku_log_quiet() {
|
||||||
|
declare desc="log quiet formatter"
|
||||||
|
if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then
|
||||||
|
echo "$*"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
dokku_log_info1() {
|
dokku_log_info1() {
|
||||||
declare desc="log info1 formatter"
|
declare desc="log info1 formatter"
|
||||||
echo "-----> $*"
|
echo "-----> $*"
|
||||||
|
|||||||
Reference in New Issue
Block a user