Skip to content

Commit

Permalink
Ⓜ️ Fix env variable parsing strings containing the "=" char
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasbaile committed Jul 19, 2023
1 parent e422490 commit 3a07e48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func renderTemplate(cmd *cobra.Command, args []string) error {
ctx := gonja.Context{}
for _, element := range os.Environ() {
variable := strings.Split(element, "=")
ctx[variable[0]] = variable[1]
ctx[variable[0]] = strings.Join(variable[1:], "=")
}
out, err := tpl.Execute(ctx)
if err != nil {
Expand Down

0 comments on commit 3a07e48

Please sign in to comment.