We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be96fff commit b4cbd6cCopy full SHA for b4cbd6c
cli/root.go
@@ -549,13 +549,11 @@ func checkWarnings(cmd *cobra.Command, client *codersdk.Client) error {
549
defer cancel()
550
551
entitlements, err := client.Entitlements(ctx)
552
- if err != nil {
553
- return xerrors.Errorf("get entitlements to show warnings: %w", err)
554
- }
555
- for _, w := range entitlements.Warnings {
556
- _, _ = fmt.Fprintln(cmd.ErrOrStderr(), cliui.Styles.Warn.Render(w))
+ if err == nil {
+ for _, w := range entitlements.Warnings {
+ _, _ = fmt.Fprintln(cmd.ErrOrStderr(), cliui.Styles.Warn.Render(w))
+ }
557
}
558
-
559
return nil
560
561
0 commit comments