Fix: ALWAYS_FRESH_INSTALL behavior#1470
Merged
jokob-sk merged 1 commit intonetalertx:mainfrom Jan 29, 2026
Merged
Conversation
Contributor
📝 WalkthroughWalkthroughEnhanced first-run configuration handling in the entrypoint script with strict shell execution, robust error handling for config directory creation, support for fresh install mode, and improved colored user-facing messages. Changes
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@install/production-filesystem/entrypoint.d/20-first-run-config.sh`:
- Around line 10-39: The ALWAYS_FRESH_INSTALL block uses rm -rf
"${NETALERTX_CONFIG}"/* which is unsafe if NETALERTX_CONFIG is empty or “/”;
update the safety checks in that block to first verify NETALERTX_CONFIG is
non-empty and not equal to "/" (and fail with an explicit error if it is), and
then use a guarded expansion when invoking rm (e.g., the shell parameter
expansion guard or equivalent) so the delete becomes a no-op or aborts on
unset/empty; reference the ALWAYS_FRESH_INSTALL conditional and the
NETALERTX_CONFIG variable when making these changes.
Collaborator
|
Thanks @adamoutler 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This provides a fix for ALWAYS_FRESH_INSTALL and makes the 20-first-run-config.sh follow the same logic as 25-first-rundb.sh. Additionally, it provides a message on folder creation issues.
Summary by CodeRabbit
New Features
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.