fix(flex): only accept 'true' or 'false' for boolean env vars#565
Open
kojiromike wants to merge 2 commits intoopenemr:masterfrom
Open
fix(flex): only accept 'true' or 'false' for boolean env vars#565kojiromike wants to merge 2 commits intoopenemr:masterfrom
kojiromike wants to merge 2 commits intoopenemr:masterfrom
Conversation
Replace the permissive boolean handling that accepted 'yes', 'no', '1',
'0', 'true', 'false' with strict validation requiring only 'true' or
'false' string values.
Benefits:
- Simpler checks using shell builtins (e.g., `if ${VAR}; then`)
- Fail-fast with clear error messages for invalid values
- No normalization logic needed
- Consistent behavior across all boolean env vars
Affected variables:
- DEVELOPER_TOOLS
- EASY_DEV_MODE
- EASY_DEV_MODE_NEW
- EMPTY
- FORCE_NO_BUILD_MODE
- INSANE_DEV_MODE
- MANUAL_SETUP
- PCOV_ON
- SWARM_MODE
- XDEBUG_ON
Closes openemr#564
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.
Summary
true/falsevalidationvalidate_bool()function that exits with clear error message for invalid valuesif ${VAR}; then)Migration
Users with
EASY_DEV_MODE=1or=yeswill see:Test plan
EASY_DEV_MODE=true,EASY_DEV_MODE=false)EASY_DEV_MODE=yes) - should fail immediately with clear errorCloses #564
🤖 Generated with Claude Code