File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
internal/cmd/config/profile Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -50,15 +50,16 @@ func NewCmd(p *print.Printer) *cobra.Command {
5050 return fmt .Errorf ("set profile: %w" , err )
5151 }
5252
53+ p .Info ("Successfully set active profile to %q\n " , model .Profile )
54+
5355 flow , err := auth .GetAuthFlow ()
5456 if err != nil {
5557 p .Debug (print .WarningLevel , "both keyring and text file storage failed to find a valid authentication flow for the active profile" )
5658 p .Warn ("The active profile %q is not authenticated, please login using the 'stackit auth login' command.\n " , model .Profile )
57- } else {
58- p .Debug (print .DebugLevel , "found valid authentication flow for active profile: %s" , flow )
59+ return nil
5960 }
61+ p .Debug (print .DebugLevel , "found valid authentication flow for active profile: %s" , flow )
6062
61- p .Info ("Successfully set active profile to %q\n " , model .Profile )
6263 return nil
6364 },
6465 }
Original file line number Diff line number Diff line change @@ -32,15 +32,16 @@ func NewCmd(p *print.Printer) *cobra.Command {
3232 return fmt .Errorf ("unset profile: %w" , err )
3333 }
3434
35+ p .Info ("Profile unset successfully. The default profile will be used.\n " )
36+
3537 flow , err := auth .GetAuthFlow ()
3638 if err != nil {
3739 p .Debug (print .WarningLevel , "both keyring and text file storage failed to find a valid authentication flow for the active profile" )
3840 p .Warn ("The default profile is not authenticated, please login using the 'stackit auth login' command.\n " )
39- } else {
40- p .Debug (print .DebugLevel , "found valid authentication flow for active profile: %s" , flow )
41+ return nil
4142 }
43+ p .Debug (print .DebugLevel , "found valid authentication flow for active profile: %s" , flow )
4244
43- p .Info ("Profile unset successfully. The default profile will be used.\n " )
4445 return nil
4546 },
4647 }
You can’t perform that action at this time.
0 commit comments