Skip to content

Emit error for all unset configuration variables#1132

Merged
mosteo merged 4 commits into
alire-project:masterfrom
jquorning:config-fault
Aug 18, 2022
Merged

Emit error for all unset configuration variables#1132
mosteo merged 4 commits into
alire-project:masterfrom
jquorning:config-fault

Conversation

@jquorning

Copy link
Copy Markdown
Contributor

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.

@Fabien-Chouteau Fabien-Chouteau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks @jquorning

@Fabien-Chouteau

Copy link
Copy Markdown
Member

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

@mosteo

mosteo commented Aug 17, 2022

Copy link
Copy Markdown
Member

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

@mosteo

mosteo commented Aug 17, 2022

Copy link
Copy Markdown
Member

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

@mosteo mosteo merged commit 74d3b96 into alire-project:master Aug 18, 2022
@mosteo

mosteo commented Aug 18, 2022

Copy link
Copy Markdown
Member

Thanks, merged.

@jquorning jquorning deleted the config-fault branch August 20, 2022 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants