Skip to content

Commit

Permalink
replace dashes with underscores when exporting to the environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Fuentes committed Aug 7, 2017
1 parent 2ec2115 commit e799a1f
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 e799a1f

Please sign in to comment.