Skip to content

Commit

Permalink
propagate tctl verbose flag (#29870)
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinFrazar committed Aug 2, 2023
1 parent fe39438 commit ab42702
Show file tree
Hide file tree
Showing 10 changed files with 83 additions and 89 deletions.
4 changes: 2 additions & 2 deletions tool/tctl/common/app_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ func (c *AppsCommand) ListApps(ctx context.Context, clt auth.ClientI) error {
}
}

coll := &appServerCollection{servers: servers, verbose: c.verbose}
coll := &appServerCollection{servers: servers}

switch c.format {
case teleport.Text:
return trace.Wrap(coll.writeText(os.Stdout))
return trace.Wrap(coll.writeText(os.Stdout, c.verbose))
case teleport.JSON:
return trace.Wrap(coll.writeJSON(os.Stdout))
case teleport.YAML:
Expand Down
6 changes: 4 additions & 2 deletions tool/tctl/common/auth_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,13 @@ func (a *AuthCommand) ListAuthServers(ctx context.Context, clusterAPI auth.Clien
return trace.Wrap(err)
}

sc := &serverCollection{servers, false}
sc := &serverCollection{servers}

switch a.format {
case teleport.Text:
return sc.writeText(os.Stdout)
// auth servers don't have labels.
verbose := false
return sc.writeText(os.Stdout, verbose)
case teleport.YAML:
return writeYAML(sc, os.Stdout)
case teleport.JSON:
Expand Down

0 comments on commit ab42702

Please sign in to comment.