Skip to content

Commit

Permalink
Added format option to not wrap param value in single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Hassett committed Nov 16, 2018
1 parent 7b923e0 commit 570b4f5
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 570b4f5

Please sign in to comment.