Skip to content

Commit aee66fb

Browse files
committed
Un-deprecate non-strict YAML
We still warn the user because it could be due to typos, but we no longer threaten to make strict mode the default. Allowing non-strict YAML is very useful for maintainers switching between feature branches. Failing on non-strict YAML would make it hard to e.g. delete instances that have been created by a different branch that introduces a new field. Signed-off-by: Jan Dubois <[email protected]>
1 parent 50e0758 commit aee66fb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/limayaml/marshal.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ func Unmarshal(data []byte, v interface{}, comment string) error {
4545
return fmt.Errorf("failed to unmarshal YAML (%s): %w", comment, err)
4646
}
4747
if err := yaml.UnmarshalWithOptions(data, v, yaml.Strict(), yaml.CustomUnmarshaler[Disk](unmarshalDisk)); err != nil {
48-
logrus.WithField("comment", comment).WithError(err).Warn("Non-strict YAML is deprecated and will be unsupported in a future version of Lima")
49-
// Non-strict YAML is known to be used by Rancher Desktop:
50-
// https://github.com/rancher-sandbox/rancher-desktop/blob/c7ea7508a0191634adf16f4675f64c73198e8d37/src/backend/lima.ts#L114-L117
48+
logrus.WithField("comment", comment).WithError(err).Warn("Non-strict YAML detected; please check for typos")
5149
}
5250
return nil
5351
}

0 commit comments

Comments
 (0)