Skip to content

Commit fed24da

Browse files
authored
Merge pull request #3666 from afbjorklund/version-unknown
Avoid segfault with unknown versions
2 parents 5bf5e51 + 3db05ee commit fed24da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/limayaml/validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func Validate(y *LimaYAML, warn bool) error {
4444
if err != nil {
4545
errs = errors.Join(errs, fmt.Errorf("can't parse builtin Lima version %q: %w", version.Version, err))
4646
}
47-
if versionutil.GreaterThan(*y.MinimumLimaVersion, limaVersion.String()) {
47+
if limaVersion != nil && versionutil.GreaterThan(*y.MinimumLimaVersion, limaVersion.String()) {
4848
errs = errors.Join(errs, fmt.Errorf("template requires Lima version %q; this is only %q", *y.MinimumLimaVersion, limaVersion.String()))
4949
}
5050
}

0 commit comments

Comments
 (0)