hack: parse out the info flags for report subcommands separately

pflag doesn't ignore unspecified arguments, so they must be parsed out separately first.
This commit is contained in:
Jose Diaz-Gonzalez
2020-12-21 01:36:59 -05:00
parent 8240790381
commit 1439e8b30b
13 changed files with 56 additions and 58 deletions

View File

@@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"path/filepath"
"strings"
dockeroptions "github.com/dokku/dokku/plugins/docker-options"
@@ -45,11 +44,6 @@ func CommandRebuild(appName string, allApps bool, parallelCount int) error {
// CommandReport displays a ps report for one or more apps
func CommandReport(appName string, infoFlag string) error {
if strings.HasPrefix(appName, "--") {
infoFlag = appName
appName = ""
}
if len(appName) == 0 {
apps, err := common.DokkuApps()
if err != nil {