Skip to content

Commit 32b9ccd

Browse files
committed
Template validation needs to embed all bases first
Signed-off-by: Jan Dubois <[email protected]>
1 parent fb06e67 commit 32b9ccd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/limactl/template.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ func templateValidateAction(cmd *cobra.Command, args []string) error {
179179
if tmpl.Name == "" {
180180
return fmt.Errorf("can't determine instance name from template locator %q", arg)
181181
}
182+
// Embed default base.yaml only when fill is true.
183+
if err := tmpl.Embed(cmd.Context(), true, fill); err != nil {
184+
return err
185+
}
182186
// Load() will merge the template with override.yaml and default.yaml via FillDefaults().
183187
// FillDefaults() needs the potential instance directory to validate host templates using {{.Dir}}.
184188
filePath := filepath.Join(limaDir, tmpl.Name+".yaml")

0 commit comments

Comments
 (0)