Skip to content

Commit c66919b

Browse files
authored
Merge pull request #13 from segmentio/replace-dash-with-underscore-in-env
replace dashes with underscores when exporting to the environment
2 parents 2ec2115 + e799a1f commit c66919b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/exec.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ func execRun(cmd *cobra.Command, args []string) error {
6363
}
6464
for _, secret := range secrets {
6565
envVarKey := strings.ToUpper(key(secret.Meta.Key))
66+
envVarKey = strings.Replace(envVarKey, "-", "_", -1)
6667

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

0 commit comments

Comments
 (0)