Skip to content

Commit

Permalink
Replace dashes with underscores for env var names
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Dementyev authored and ekini committed Aug 17, 2023
1 parent b26526d commit 26d7964
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ var runCmd = &cobra.Command{
}

for key, value := range secrets {
os.Setenv(key, value)
// replace dashes with underscores for all env var names
// that's because keyvault secret names can't have underscores in them
// and at the same time env vars can't have dashes in them
os.Setenv(strings.Replace(key, "-", "_", -1), value)
}
}

Expand Down

0 comments on commit 26d7964

Please sign in to comment.