Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion internal/pkg/cli/env_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,15 @@ func (o *initEnvOpts) askEnvSession() error {

selCreds, err := o.selCreds()
if err != nil {
return err
errRetrieveCreds := err
sess, err := o.sessProvider.Default()
if err != nil {
return errors.Join(errRetrieveCreds, fmt.Errorf("falling back on default credentials: %w", err))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noice! It is a good call to include errRetrieveCreds in this case 👍🏼 !

}
o.sess = sess
return nil
}

sess, err := selCreds.Creds(fmt.Sprintf(fmtEnvInitCredsPrompt, color.HighlightUserInput(o.name)), envInitCredsHelpPrompt)
if err != nil {
return fmt.Errorf("select creds: %w", err)
Expand Down
Loading