mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 08:23:47 +01:00
googlecloudstorage: fix service_account_file been ignored - Fixes #2523
This commit is contained in:
parent
4ca26eb38c
commit
6b8b9d19f3
@ -345,7 +345,7 @@ func NewFs(name, root string, m configmap.Mapper) (fs.Fs, error) {
|
||||
}
|
||||
|
||||
// try loading service account credentials from env variable, then from a file
|
||||
if opt.ServiceAccountCredentials != "" && opt.ServiceAccountFile != "" {
|
||||
if opt.ServiceAccountCredentials == "" && opt.ServiceAccountFile != "" {
|
||||
loadedCreds, err := ioutil.ReadFile(os.ExpandEnv(opt.ServiceAccountFile))
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "error opening service account credentials file")
|
||||
|
Loading…
Reference in New Issue
Block a user