mirror of
https://github.com/restic/restic.git
synced 2026-05-24 11:05:26 +00:00
Add AWS_REGION env var to specify s3 region
This commit is contained in:
committed by
Alexander Neumann
parent
aa5af8af0e
commit
df500a372d
@@ -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