Преглед изворни кода

Have `accounts` print nothing when unauth'd

This replicates behavior elsewhere, where we don't output anything if
there is no information to show. Instead, the "no accounts" message will
only show if the user supplies a -v / --verbose flag.
pull/44/head
Matt Baer пре 4 година
родитељ
комит
c9f20e27f7
1 измењених фајлова са 2 додато и 2 уклоњено
  1. +2
    -2
      cmd/wf/commands.go

+ 2
- 2
cmd/wf/commands.go Прегледај датотеку

@@ -239,8 +239,8 @@ func cmdAccounts(c *cli.Context) error {

// print out all logged in accounts
tw := tabwriter.NewWriter(os.Stdout, 10, 2, 2, ' ', tabwriter.TabIndent)
if len(accounts) == 0 {
fmt.Fprintf(tw, "%s\t", "No authenticated accounts found.")
if len(accounts) == 0 && (c.Bool("v") || c.Bool("verbose") || c.GlobalBool("v") || c.GlobalBool("verbose")) {
fmt.Fprintf(tw, "%s\t", "No authenticated accounts found.\n")
}
for _, userList := range accounts {
host := userList[0]


Loading…
Откажи
Сачувај