Skip to content

Commit

Permalink
Display a warning when provisioning scripts use LIMA_CIDATA variables
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Dubois <[email protected]>
  • Loading branch information
jandubois committed Jan 10, 2024
1 parent c2636f3 commit 764d5df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/limayaml/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ func Validate(y LimaYAML, warn bool) error {
return fmt.Errorf("field `provision[%d].mode` must one of %q, %q, %q, or %q",
i, ProvisionModeSystem, ProvisionModeUser, ProvisionModeBoot, ProvisionModeDependency)
}
if strings.Contains(p.Script, "LIMA_CIDATA") {
logrus.Warn("provisioning scripts should not reference the LIMA_CIDATA variables")
}
}
needsContainerdArchives := (y.Containerd.User != nil && *y.Containerd.User) || (y.Containerd.System != nil && *y.Containerd.System)
if needsContainerdArchives && len(y.Containerd.Archives) == 0 {
Expand Down

0 comments on commit 764d5df

Please sign in to comment.