Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update v2 branch with code from the master branch #282

Merged
merged 7 commits into from
Oct 8, 2020
Merged

Update v2 branch with code from the master branch #282

merged 7 commits into from
Oct 8, 2020

Conversation

azr
Copy link
Contributor

@azr azr commented Sep 30, 2020

this brings #256 & #261 into the v2 branch

I had rename Request.Mode to Request.GetMode so that we can have a Request.Mode ( for the umask mode ). Maybe there's a better name than Request.Mode there too

@azr azr marked this pull request as draft October 1, 2020 09:32
@azr azr marked this pull request as ready for review October 1, 2020 13:35
Comment on lines +311 to +331
func (g *Getter) newS3Client(
region string, url *url.URL, creds *credentials.Credentials,
) (*s3.S3, error) {
var sess *session.Session

if profile := url.Query().Get("aws_profile"); profile != "" {
var err error
sess, err = session.NewSessionWithOptions(session.Options{
Profile: profile,
SharedConfigState: session.SharedConfigEnable,
})
if err != nil {
return nil, err
}
} else {
config := g.getAWSConfig(region, url, creds)
sess = session.New(config)
}

return s3.New(sess), nil
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is from #261

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant