fix(launcher): bypass broken shebang by invoking bin/odoo through python#68
Merged
fix(launcher): bypass broken shebang by invoking bin/odoo through python#68
Conversation
53cc299 to
f5e17c7
Compare
e32eb61 to
107841e
Compare
uv pip install -e writes a temporary build path as the shebang in bin/odoo, which breaks after installation. Instead of calling bin/odoo directly, run it via 'python $VENV_DIR/bin/odoo' to ignore the shebang and use the venv's Python interpreter.
…ke master Use get_odoo_version from odoo-addons-path to detect the actual Odoo major version when the branch name is non-numeric (e.g. "master"). Previously the launcher was named odoo-vmaster instead of odoo-v19, causing the e2e smoke test to fail with "command not found". Bump odoo-addons-path dependency to >=1.2.0 for get_odoo_version.
e8bc8ee to
98c1437
Compare
The `master` branch doesn't follow the `X.0` pattern, so
`${version%%.*}` yields "master" instead of a numeric major.
Read the real major from release.py for master entries.
odoo-addons-path 1.2.0 always calls detect_codebase_layout() on the CWD. In CI the CWD is the odoo-venv checkout (not an Odoo project), causing exit 1 before odoo-venv create even runs. Pass the Odoo source dir as the positional codebase argument so layout detection succeeds.
98c1437 to
969362d
Compare
Collaborator
Author
|
|
nilshamerlinck
approved these changes
Mar 26, 2026
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.
Root Cause
uv pip install -ewrites a broken shebang inbin/odoopointing to a temporary build directory (e.g.~/.cache/uv/builds-v0/.tmpdJaf0T/bin/python) that is deleted after installation. The launcher script calledodoodirectly, hitting this broken interpreter.Fix
Replace
CMD=("odoo")withCMD=("python" "$VENV_DIR/bin/odoo")in the launcher template. This runs the existingbin/odooscript through the venv's Python interpreter, bypassing the broken shebang while preserving each Odoo version's own import logic (which differs between v12 and v19).