Merge pull request #758 from ys/s3-bucket-config-var

Allow s3 bucket to come from config vars
This commit is contained in:
Jeff Mitchell 2015-11-06 09:21:35 -05:00
commit 601f85a934
1 changed files with 4 additions and 1 deletions

View File

@ -32,7 +32,10 @@ func newS3Backend(conf map[string]string) (Backend, error) {
bucket, ok := conf["bucket"]
if !ok {
return nil, fmt.Errorf("'bucket' must be set")
bucket = os.Getenv("AWS_S3_BUCKET")
if bucket == "" {
return nil, fmt.Errorf("'bucket' must be set")
}
}
access_key, ok := conf["access_key"]