Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Lou1415926 committed Aug 4, 2020
1 parent 9e62dec commit f1e629d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/pkg/cli/task_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ func (o *runTaskOpts) configureRunner() taskRunner {
func (o *runTaskOpts) configureSessAndEnv() error {
var sess *awssession.Session
var env *config.Environment
var err error

provider := session.NewProvider()
if o.env != "" {
var err error
env, err = o.targetEnv()
if err != nil {
return err
Expand All @@ -204,6 +204,7 @@ func (o *runTaskOpts) configureSessAndEnv() error {
return fmt.Errorf("get session from role %s and region %s: %w", env.ManagerRoleARN, env.Region, err)
}
} else {
var err error
sess, err = provider.Default()
if err != nil {
return fmt.Errorf("get default session: %w", err)
Expand Down

0 comments on commit f1e629d

Please sign in to comment.