-
Notifications
You must be signed in to change notification settings - Fork 768
Open
Description
> They can return errors in validation, instead of warnings?
@afbjorklund Yes, they can. The warning comes from func (l *LimaVzDriver) Validate() error { and just write to the log, but don't return an error:
lima/pkg/vz/vz_driver_darwin.go
Lines 134 to 139 in 374db8b
| switch audioDevice := *l.Yaml.Audio.Device; audioDevice { | |
| case "": | |
| case "vz", "default", "none": | |
| default: | |
| logrus.Warnf("field `audio.device` must be \"vz\", \"default\", or \"none\" for VZ driver, got %q", audioDevice) | |
| } |
I think all the warning should return an error instead (but in a separate PR).
I also think limaDriver.Validate() should be called as part of limayaml.Validate() or through some wrapper that will call both. Calling it as part of instance.Prepare() is too late.
Originally posted by @jandubois in #1951 (comment)
Metadata
Metadata
Assignees
Labels
No labels