Skip to content

Commit 764d5df

Browse files
committed
Display a warning when provisioning scripts use LIMA_CIDATA variables
Signed-off-by: Jan Dubois <jan.dubois@suse.com>
1 parent c2636f3 commit 764d5df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/limayaml/validate.go

+3
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ func Validate(y LimaYAML, warn bool) error {
187187
return fmt.Errorf("field `provision[%d].mode` must one of %q, %q, %q, or %q",
188188
i, ProvisionModeSystem, ProvisionModeUser, ProvisionModeBoot, ProvisionModeDependency)
189189
}
190+
if strings.Contains(p.Script, "LIMA_CIDATA") {
191+
logrus.Warn("provisioning scripts should not reference the LIMA_CIDATA variables")
192+
}
190193
}
191194
needsContainerdArchives := (y.Containerd.User != nil && *y.Containerd.User) || (y.Containerd.System != nil && *y.Containerd.System)
192195
if needsContainerdArchives && len(y.Containerd.Archives) == 0 {

0 commit comments

Comments
 (0)