s3: attempt to fix –s3-profile failing when explicit s3 endpoint is present FIXME DO NOT MERGE

This effectively reverts a fix so shouldn't be merged directly
This commit is contained in:
Nick Craig-Wood 2023-02-28 16:34:21 +00:00
parent 56b582cdb9
commit 31cb3beb7b

View File

@ -2657,7 +2657,7 @@ func s3Connection(ctx context.Context, opt *Options, client *http.Client) (*s3.S
} }
// The session constructor (aws/session/mergeConfigSrcs) will only use the user's preferred credential source // The session constructor (aws/session/mergeConfigSrcs) will only use the user's preferred credential source
// (from the shared config file) if the passed-in Options.Config.Credentials is nil. // (from the shared config file) if the passed-in Options.Config.Credentials is nil.
awsSessionOpts.Config.Credentials = nil // awsSessionOpts.Config.Credentials = nil
} }
ses, err := session.NewSessionWithOptions(awsSessionOpts) ses, err := session.NewSessionWithOptions(awsSessionOpts)
if err != nil { if err != nil {