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: don't use config file when failed to load #2022

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

FreddyDevelop
Copy link
Contributor

Description

The config loading mechanism always tries to unmarshal the config file, even when it could not be loaded. The file should only be unmarshalled when the file could be loaded successfully.

Implementation

Move the Unmarshal function into the if statement where we know that the file was loaded successfully.

Tests

Try to start the backend with missing config file.

Don't try to unmarshal the config file when it could not be loaded.
@FreddyDevelop FreddyDevelop merged commit e2e76b5 into main Jan 10, 2025
8 checks passed
@FreddyDevelop FreddyDevelop deleted the fix-config-file-loading branch January 10, 2025 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Recently closed
Development

Successfully merging this pull request may close these issues.

2 participants