From b3d2cc6e376fa80fbd9c7bfcfc6cc72ec1c07f48 Mon Sep 17 00:00:00 2001 From: Jake Shorty Date: Fri, 17 Jun 2022 21:09:38 +0000 Subject: [PATCH] Handle 404s smoothly during create on codespaces pre-flight --- pkg/cmd/codespace/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/codespace/create.go b/pkg/cmd/codespace/create.go index abb9112ba..9d00f205d 100644 --- a/pkg/cmd/codespace/create.go +++ b/pkg/cmd/codespace/create.go @@ -133,7 +133,7 @@ func (a *App) Create(ctx context.Context, opts createOptions) error { billableOwner, err := a.apiClient.GetCodespacePreFlight(ctx, userInputs.Repository) a.StopProgressIndicator() - if billableOwner.Type == "Organization" { + 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)) } else if err != nil {