fix: correct issue where all flags were not shown if an invalid flag was specified

This commit is contained in:
Jose Diaz-Gonzalez
2021-01-07 01:34:05 -05:00
parent 666bb9dfee
commit d70a9be97e
8 changed files with 56 additions and 20 deletions

View File

@@ -28,10 +28,15 @@ func ReportSingleApp(appName, infoFlag string) error {
flags[flag] = fn
}
flagKeys := []string{}
for flagKey := range flags {
flagKeys = append(flagKeys, flagKey)
}
trimPrefix := false
uppercaseFirstCharacter := true
infoFlags := common.CollectReport(appName, infoFlag, flags)
return common.ReportSingleApp("ps", appName, infoFlag, infoFlags, trimPrefix, uppercaseFirstCharacter)
return common.ReportSingleApp("ps", appName, infoFlag, infoFlags, flagKeys, trimPrefix, uppercaseFirstCharacter)
}
func addStatusFlags(appName string, infoFlag string) map[string]common.ReportFunc {