Skip to content

Commit

Permalink
fix: trim space from templates before render
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Meier <[email protected]>
  • Loading branch information
astromechza committed Mar 10, 2024
1 parent d98d2db commit cee2967
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/provisioners/templateprov/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"context"
"fmt"
"html/template"
"strings"

"github.com/Masterminds/sprig/v3"
compose "github.com/compose-spec/compose-go/v2/types"
Expand Down Expand Up @@ -65,6 +66,7 @@ func (p *Provisioner) Match(resUid project.ResourceUid) bool {
}

func renderTemplateAndDecode(raw string, data interface{}, out interface{}) error {
raw = strings.TrimSpace(raw)
if raw == "" {
return nil
}
Expand Down

0 comments on commit cee2967

Please sign in to comment.