fix: pass OM1_COMMAND as environment variable to container#2190
Closed
0xbyt4 wants to merge 3 commits intoOpenMind:mainfrom
Closed
fix: pass OM1_COMMAND as environment variable to container#21900xbyt4 wants to merge 3 commits intoOpenMind:mainfrom
0xbyt4 wants to merge 3 commits intoOpenMind:mainfrom
Conversation
OM1_COMMAND from .env was only used in the command directive ($@) but never passed as an environment variable. This caused the entrypoint's env var check to always fail, ignoring the user's config choice when runtime.json5 exists.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
OM1_COMMANDfrom.envwas only used in thecommanddirective (passed as$@) but never passed as an environment variable to the containerOM1_COMMANDas an env var first (added in update docker file to use OM1_COMMAND from env file #2183), but it was never set, so this check always failedruntime.json5exists, the user's config choice from.envwas silently ignoredChanges
OM1_COMMAND=${OM1_COMMAND:-}to theenvironmentsection indocker-compose.ymlHow it works
The entrypoint has three priority levels:
OM1_COMMANDenv var (explicit user choice)runtime.json5(persisted config)$@command argument (default fallback)Without this fix, level 1 never triggered via docker-compose because the env var wasn't passed to the container. Level 2 would take over, ignoring the user's
.envsetting.