Output paid message for codespace create to stderr not stdout (#6258)

This commit is contained in:
Sam Coe 2022-09-14 15:33:55 +04:00 committed by GitHub
parent e14d14cef2
commit a30de8d72a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -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 {

View file

@ -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",