Skip to content

Commit

Permalink
Merge pull request #3104 from jandubois/yaml-strict
Browse files Browse the repository at this point in the history
Un-deprecate non-strict YAML
  • Loading branch information
jandubois authored Jan 10, 2025
2 parents 323a5ec + aee66fb commit 9c629ea
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/limayaml/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ func Unmarshal(data []byte, v interface{}, comment string) error {
return fmt.Errorf("failed to unmarshal YAML (%s): %w", comment, err)
}
if err := yaml.UnmarshalWithOptions(data, v, yaml.Strict(), yaml.CustomUnmarshaler[Disk](unmarshalDisk)); err != nil {
logrus.WithField("comment", comment).WithError(err).Warn("Non-strict YAML is deprecated and will be unsupported in a future version of Lima")
// Non-strict YAML is known to be used by Rancher Desktop:
// https://github.com/rancher-sandbox/rancher-desktop/blob/c7ea7508a0191634adf16f4675f64c73198e8d37/src/backend/lima.ts#L114-L117
logrus.WithField("comment", comment).WithError(err).Warn("Non-strict YAML detected; please check for typos")
}
return nil
}

0 comments on commit 9c629ea

Please sign in to comment.