feat: add --format json option to odoo-addons-path CLI#14
Open
trisdoan wants to merge 1 commit into
Open
Conversation
Emit a machine-readable JSON object (layout, odoo_dir, version, addons_path) instead of the plain comma-joined addons_path string. Useful for agents and tooling that need structured layout detection. - Add OutputFormat enum (text/json) and --format option to main command - Add _detect_layout_named() wrapper to surface detector name without changing the public detect_codebase_layout() signature - JSON branch catches no-layout directories and exits 0 with layout=null instead of the hard exit-1 kept for --format text - --check-versions warnings continue to go to stderr only
26fdb1e to
69deba2
Compare
6 tasks
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
--format jsonoption to theodoo-addons-pathCLI so agents and tooling can request structured layout detection instead of the plain comma-joined addons_path stringlayout,odoo_dir,version, andaddons_pathfields_detect_layout_named()wrapper surfaces the detector name without touching the publicdetect_codebase_layout()signatureBehaviour