mirror of
https://github.com/restic/restic.git
synced 2026-10-07 03:07:11 +00:00
Add AWS_REGION env var to specify s3 region
This commit is contained in:
1 parent
aa5af8af0e
commit
df500a372d
3 files changed
+6
-1
No files matched your search
@@ -485,6 +485,10 @@ func parseConfig(loc location.Location, opts options.Options) (interface{}, erro
|
||||
cfg.Secret = os.Getenv("AWS_SECRET_ACCESS_KEY")
|
||||
}
|
||||
|
||||
if cfg.Region == "" {
|
||||
cfg.Region = os.Getenv("AWS_REGION")
|
||||
}
|
||||
|
||||
if err := opts.Apply(loc.Scheme, &cfg); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user