Skip to content

Commit

Permalink
Merge pull request #13 from segmentio/replace-dash-with-underscore-in…
Browse files Browse the repository at this point in the history
…-env

replace dashes with underscores when exporting to the environment
  • Loading branch information
dfuentes committed Aug 7, 2017
2 parents 2ec2115 + e799a1f commit c66919b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func execRun(cmd *cobra.Command, args []string) error {
}
for _, secret := range secrets {
envVarKey := strings.ToUpper(key(secret.Meta.Key))
envVarKey = strings.Replace(envVarKey, "-", "_", -1)

if env.IsSet(envVarKey) {
fmt.Fprintf(os.Stderr, "warning: overwriting environment variable %s\n", envVarKey)
Expand Down

0 comments on commit c66919b

Please sign in to comment.