Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 7e9f921

Browse files
committed
fixup! Add list users command
Change-Id: I74d5a3daec28dc93cc00cb4b3f97b2d205c6a67d
1 parent 0cf451b commit 7e9f921

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/coder/users.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func (cmd *listCmd) Run(fl *pflag.FlagSet) {
5858

5959
switch cmd.outputFmt {
6060
case "human":
61-
w := tabwriter.NewWriter(os.Stdout, 0, 0, 3, ' ', tabwriter.AlignRight)
61+
w := tabwriter.NewWriter(os.Stdout, 0, 0, 3, ' ', 0)
6262
for _, u := range users {
6363
_, err = fmt.Fprintln(w, tabDelimited(u))
6464
if err != nil {
@@ -75,7 +75,7 @@ func (cmd *listCmd) Run(fl *pflag.FlagSet) {
7575
flog.Fatal("failed to encode users to json: %v", err)
7676
}
7777
default:
78-
flog.Fatal("unsupported output type %q", cmd.outputFmt)
78+
flog.Fatal("unsupported output type %q.\nusage: --output (json | human)", cmd.outputFmt)
7979
}
8080

8181
}
@@ -86,7 +86,7 @@ func (cmd *listCmd) RegisterFlags(fl *pflag.FlagSet) {
8686

8787
func (cmd *listCmd) Spec() cli.CommandSpec {
8888
return cli.CommandSpec{
89-
Name: "list",
89+
Name: "ls",
9090
Usage: "<flags>",
9191
Desc: "list all users",
9292
}

0 commit comments

Comments
 (0)