osbuild / images

Image builder image definition library
Apache License 2.0
23 stars 52 forks source link

blueprint: add map conversion check to fs customization unmarshaller #1033

Closed achilleas-k closed 1 week ago

achilleas-k commented 1 week ago

If an element in the customizations.filesystem array is not an object, the existing code would fail the conversion without an error, but would fail on the d["mountpoint"].(type) conversion, which produces an error message that isn't very useful:

  mountpoint must be string, got <nil> of type <nil>

The commit catches the conversion error and instead prints a more useful error message.