Skip to content

Commit 2e50673

Browse files
committed
Remove dead nil check in org switch command
SelectOrganization() never returns (nil, nil) - all code paths that return a nil organization also return a non-nil error. The error check on line 23-25 already handles all nil cases, making the subsequent nil check unreachable.
1 parent 62c369f commit 2e50673

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

pkg/cmd/org/switch.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ func NewCmdSwitch() *cobra.Command {
2323
if err != nil {
2424
return err
2525
}
26-
if org == nil {
27-
return fmt.Errorf("no organizations found")
28-
}
2926
orgId = org.OrgId
3027
}
3128

0 commit comments

Comments
 (0)