alire icon indicating copy to clipboard operation
alire copied to clipboard

Emit error for all unset configuration variables

Open jquorning opened this issue 2 years ago • 1 comments

Improve user experience by emitting error for each unset configuration variable.

Output of alr get lvgl_ada:

error: Configuration variable 'lvgl_ada.density_per_inch' not set and has no default value.
error: Configuration variable 'lvgl_ada.pixel_bit_depth' not set and has no default value.
error: Configuration variable 'lvgl_ada.horizontal_resolution' not set and has no default value.
error: Configuration variable 'lvgl_ada.vertical_resolution' not set and has no default value.
error: Configuration failed

Before:

error: Configuration variable 'lvgl_ada.density_per_inch not set and has no default value.

jquorning avatar Aug 04 '22 20:08 jquorning

@jquorning you might want to add a test case for that.

Fabien-Chouteau avatar Aug 08 '22 10:08 Fabien-Chouteau

I was bitten by this very same case once. Thanks!

mosteo avatar Aug 17 '22 12:08 mosteo

Minor last thing: I would move the test from the get to the config dir, as it applies outside of the get command.

mosteo avatar Aug 17 '22 12:08 mosteo

Thanks, merged.

mosteo avatar Aug 18 '22 10:08 mosteo