Created
November 6, 2015 13:04
-
-
Save ys/cebebe8c1e260c5f4845 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/physical/s3.go b/physical/s3.go | |
index 398ada5..fb50248 100644 | |
--- a/physical/s3.go | |
+++ b/physical/s3.go | |
@@ -32,7 +31,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"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment