Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: announce when a config file is invalid and exit with a non-zero code #1242

Merged
merged 5 commits into from
Sep 16, 2024

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Sep 11, 2024

When looking into some other config stuff I realised the current loading logic just assumes that an error is because a config doesn't exist and silently falls back to the default one, when really it could be that there is a config but it's invalid

@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.94%. Comparing base (19e0abe) to head (2236e21).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1242      +/-   ##
==========================================
+ Coverage   67.92%   67.94%   +0.01%     
==========================================
  Files         174      174              
  Lines       16835    16838       +3     
==========================================
+ Hits        11435    11440       +5     
+ Misses       4766     4765       -1     
+ Partials      634      633       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pkg/config/config.go Outdated Show resolved Hide resolved
@G-Rath G-Rath requested a review from cuixq September 12, 2024 03:44
@G-Rath G-Rath force-pushed the warn-about-invalid-config-files branch from 4627fc8 to 8da8525 Compare September 12, 2024 03:58
@another-rex another-rex merged commit 3dceabd into google:main Sep 16, 2024
13 checks passed
@another-rex another-rex deleted the warn-about-invalid-config-files branch September 16, 2024 00:55
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.

4 participants