Skip to content

Commit

Permalink
Output paid message for codespace create to stderr not stdout (cli#6258)
Browse files Browse the repository at this point in the history
  • Loading branch information
samcoe authored Sep 14, 2022
1 parent e14d14c commit a30de8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/codespace/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (a *App) Create(ctx context.Context, opts createOptions) error {
return fmt.Errorf("error checking codespace ownership: %w", err)
} else if billableOwner != nil && billableOwner.Type == "Organization" {
cs := a.io.ColorScheme()
fmt.Fprintln(a.io.Out, cs.Blue(" ✓ Codespaces usage for this repository is paid for by "+billableOwner.Login))
fmt.Fprintln(a.io.ErrOut, cs.Blue(" ✓ Codespaces usage for this repository is paid for by "+billableOwner.Login))
}

if promptForRepoAndBranch {
Expand Down
3 changes: 2 additions & 1 deletion pkg/cmd/codespace/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,8 @@ Alternatively, you can run "create" with the "--default-permissions" option to c
showStatus: false,
idleTimeout: 30 * time.Minute,
},
wantStdout: " ✓ Codespaces usage for this repository is paid for by megacorp\nmegacorp-private-abcd1234\n",
wantStderr: " ✓ Codespaces usage for this repository is paid for by megacorp\n",
wantStdout: "megacorp-private-abcd1234\n",
},
{
name: "doesn't mention billable owner when it's the individual",
Expand Down

0 comments on commit a30de8d

Please sign in to comment.