mirror of
https://github.com/rclone/rclone
synced 2024-11-08 05:31:41 +01:00
s3: fix --s3-profile which wasn't working - fixes #4757
This commit is contained in:
parent
d72d9e591a
commit
b9a015e5b9
@ -1562,6 +1562,8 @@ func s3Connection(ctx context.Context, opt *Options, client *http.Client) (*s3.S
|
||||
if opt.EnvAuth && opt.AccessKeyID == "" && opt.SecretAccessKey == "" {
|
||||
// Enable loading config options from ~/.aws/config (selected by AWS_PROFILE env)
|
||||
awsSessionOpts.SharedConfigState = session.SharedConfigEnable
|
||||
// Set the name of the profile if supplied
|
||||
awsSessionOpts.Profile = opt.Profile
|
||||
}
|
||||
ses, err := session.NewSessionWithOptions(awsSessionOpts)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user