Skip to content

Commit

Permalink
Merge pull request Droplr#5 from timhassett/master
Browse files Browse the repository at this point in the history
Added format option to not wrap param value in single quotes
  • Loading branch information
Guslington authored Nov 16, 2018
2 parents 7b923e0 + 570b4f5 commit ec3639a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ Searches for SSM Parameters in your AWS account based on the variables provided
DB_USERNAME='Username'
DB_PASSWORD='SecretPassword'
```
* `unquoted-shell`
```bash
DB_HOST=mysql
DB_USERNAME=Username
DB_PASSWORD=SecretPassword
```

### Command Line

Expand Down
2 changes: 2 additions & 0 deletions aws-env.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ func FormatParameter(key string, value string, format string) string {
switch format {
case "shell":
return fmt.Sprintf("%s='%s'\n", key, value)
case "unquoted-shell":
return fmt.Sprintf("%s=%s\n", key, value)
default:
return fmt.Sprintf("export %s=$'%s'\n", key, value)
}
Expand Down

0 comments on commit ec3639a

Please sign in to comment.