File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -221,7 +221,9 @@ This is useful when working with multiple organizations or environments.`,
221
221
if len (accounts ) == 1 {
222
222
// Only one account, just confirm it's active
223
223
for accountName := range accounts {
224
- cfg .SetActiveAccount (accountName )
224
+ if err := cfg .SetActiveAccount (accountName ); err != nil {
225
+ return fmt .Errorf ("failed to set active account: %w" , err )
226
+ }
225
227
if err := config .SaveConfig (cfg ); err != nil {
226
228
return fmt .Errorf ("failed to save config: %w" , err )
227
229
}
@@ -249,7 +251,9 @@ This is useful when working with multiple organizations or environments.`,
249
251
fmt .Println ()
250
252
}
251
253
fmt .Print ("\n Enter account name to switch to: " )
252
- fmt .Scanln (& targetAccount )
254
+ if _ , err := fmt .Scanln (& targetAccount ); err != nil {
255
+ return fmt .Errorf ("failed to read input: %w" , err )
256
+ }
253
257
}
254
258
255
259
if targetAccount == "" {
You can’t perform that action at this time.
0 commit comments