Skip to content

Return errors in config init instead of os.Exit#483

Merged
NGTmeaty merged 1 commit intointernetarchive:mainfrom
vbanos:config-exit
Sep 20, 2025
Merged

Return errors in config init instead of os.Exit#483
NGTmeaty merged 1 commit intointernetarchive:mainfrom
vbanos:config-exit

Conversation

@vbanos
Copy link
Copy Markdown
Collaborator

@vbanos vbanos commented Sep 19, 2025

Config already returns errors and terminates when there is an issue. There is no need to use os.Exit(1) for these specific cases, return error and the program will terminate anyway where config.InitConfig is invoked if it gets an error.

Relevant to: #473

Config already returns errors and terminates when there is an issue.
There is no need to use `os.Exit(1)` for these specific cases, return
error and the program will terminate anyway where `config.InitConfig` is
invoked if it gets an error.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 19, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.47%. Comparing base (0837f4d) to head (7042d30).
⚠️ Report is 63 commits behind head on main.

Files with missing lines Patch % Lines
internal/pkg/config/config.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #483      +/-   ##
==========================================
+ Coverage   56.42%   56.47%   +0.05%     
==========================================
  Files         130      130              
  Lines        8091     8089       -2     
==========================================
+ Hits         4565     4568       +3     
+ Misses       3161     3155       -6     
- Partials      365      366       +1     
Flag Coverage Δ
e2etests 40.75% <0.00%> (+0.09%) ⬆️
unittests 29.33% <0.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@NGTmeaty NGTmeaty left a comment

Choose a reason for hiding this comment

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

Looks good besides the one comment!

Comment thread internal/pkg/config/config.go
Copy link
Copy Markdown
Collaborator

@NGTmeaty NGTmeaty left a comment

Choose a reason for hiding this comment

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

Thank you!

@NGTmeaty NGTmeaty merged commit 49180eb into internetarchive:main Sep 20, 2025
2 checks passed
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