feat: allow removal of header from :list subcommand

This commit is contained in:
Jose Diaz-Gonzalez
2018-10-10 23:54:08 -04:00
parent 9a166155a3
commit 5af1d630c6

View File

@@ -440,7 +440,11 @@ service_list() {
if [[ -z $SERVICES ]]; then
dokku_log_warn "There are no $PLUGIN_SERVICE services"
else
LIST="NAME,VERSION,STATUS,EXPOSED PORTS,LINKS\n"
LIST=""
if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then
LIST="NAME,VERSION,STATUS,EXPOSED PORTS,LINKS\n"
fi
for SERVICE in $SERVICES; do
LIST+="$SERVICE,$(service_version "$SERVICE"),$(service_status "$SERVICE"),$(service_exposed_ports "$SERVICE"),$(service_linked_apps "$SERVICE")\n"
done