Skip to content

Commit 073b3a7

Browse files
committed
Template validation needs to embed all bases first
Signed-off-by: Jan Dubois <[email protected]>
1 parent 3faf293 commit 073b3a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/limactl/template.go

+4
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ func templateValidateAction(cmd *cobra.Command, args []string) error {
176176
if tmpl.Name == "" {
177177
return fmt.Errorf("can't determine instance name from template locator %q", arg)
178178
}
179+
// Embed default base.yaml only when fill is true.
180+
if err := tmpl.Embed(cmd.Context(), true, fill); err != nil {
181+
return err
182+
}
179183
// Load() will merge the template with override.yaml and default.yaml via FillDefaults().
180184
// FillDefaults() needs the potential instance directory to validate host templates using {{.Dir}}.
181185
filePath := filepath.Join(limaDir, tmpl.Name+".yaml")

0 commit comments

Comments
 (0)