diff --git a/README.md b/README.md index dc5885f..a0028ea 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,12 @@ $ export DB_USERNAME=$'Username' $ export DB_PASSWORD=$'SecretPassword' ``` +You can also pass multiple colon separated paths in the `AWS_ENV_PATH` variable: + +``` +$ export "AWS_ENV_PATH=/my-app/:/my-other-app/" +``` + ### Optional Flags #### --recursive diff --git a/aws-env.go b/aws-env.go index 9bbd62d..bb35041 100644 --- a/aws-env.go +++ b/aws-env.go @@ -34,7 +34,11 @@ func main() { sess := CreateSession() client := CreateClient(sess) - ExportVariables(client, os.Getenv("AWS_ENV_PATH"), *recursivePtr, *format, "") + env_paths := strings.Split(os.Getenv("AWS_ENV_PATH"), ":") + + for i := range env_paths { + ExportVariables(client, env_paths[i], *recursivePtr, *format, "") + } } func CreateSession() *session.Session {