Skip to content

Commit 6ba875f

Browse files
committed
Fill provision.Script with default value in FillDefault()
Signed-off-by: I Hsin Cheng <richard120310@gmail.com>
1 parent f9ab640 commit 6ba875f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/limayaml/defaults.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,10 @@ func FillDefault(ctx context.Context, y, d, o *limatype.LimaYAML, filePath strin
439439
provision.Permissions = ptr.Of("644")
440440
}
441441
}
442-
if provision.Script != nil && *provision.Script != "" {
442+
if provision.Script == nil {
443+
provision.Script = ptr.Of("")
444+
}
445+
if *provision.Script != "" {
443446
if out, err := executeGuestTemplate(*provision.Script, instDir, y.User, y.Param); err == nil {
444447
*provision.Script = out.String()
445448
} else {

0 commit comments

Comments
 (0)