Skip to content

fix(config-cli): correct misleading --json flag description#21332

Merged
gumadeiras merged 2 commits intoopenclaw:mainfrom
adhitShet:fix/config-cli-json-flag-description
Feb 20, 2026
Merged

fix(config-cli): correct misleading --json flag description#21332
gumadeiras merged 2 commits intoopenclaw:mainfrom
adhitShet:fix/config-cli-json-flag-description

Conversation

@adhitShet
Copy link
Copy Markdown
Contributor

@adhitShet adhitShet commented Feb 19, 2026

Summary

  • The --json flag on openclaw config set described itself as "Parse value as JSON5 (required)" — incorrect in two ways:
    1. The flag is not required (defaults to false)
    2. JSON5 parsing is attempted regardless — --json only enables strict mode
  • Without --json: JSON5 tried, falls back to raw string on failure
  • With --json: JSON5 tried, throws error on failure
  • Updated description to "Strict JSON5 parsing (error instead of raw string fallback)"

Test plan

  • Run openclaw config set --help — verify updated description
  • Lint/format pass

🤖 Generated with Claude Code

Greptile Summary

Corrected the --json flag description for openclaw config set command. The previous description incorrectly stated the flag was "required" and misleadingly suggested it controlled whether JSON5 parsing was attempted. In reality, JSON5 parsing is always attempted regardless of the flag - the flag only controls whether to throw an error or fall back to treating the value as a raw string when parsing fails.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The change is a simple documentation fix to a single CLI flag description, making it more accurate and less misleading. No code logic was modified - only the help text string was updated. The new description accurately reflects the actual behavior of the flag as verified by examining the parseValue function implementation.
  • No files require special attention

Last reviewed commit: 9b27577

@openclaw-barnacle openclaw-barnacle bot added cli CLI command changes size: XS labels Feb 19, 2026
@gumadeiras gumadeiras self-assigned this Feb 20, 2026
@gumadeiras gumadeiras force-pushed the fix/config-cli-json-flag-description branch from 9b27577 to bb7bb8a Compare February 20, 2026 01:03
@openclaw-barnacle openclaw-barnacle bot added docs Improvements or additions to documentation size: S and removed size: XS labels Feb 20, 2026
Adi-A and others added 2 commits February 19, 2026 20:07
…g set

The description said "Parse value as JSON5 (required)" which incorrectly
implied the flag was mandatory. JSON5 is always attempted; --json only
controls whether parse failure throws an error or falls back to raw string.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@gumadeiras gumadeiras force-pushed the fix/config-cli-json-flag-description branch from bb7bb8a to b6c8d1e Compare February 20, 2026 01:09
@gumadeiras gumadeiras merged commit d871ee9 into openclaw:main Feb 20, 2026
7 checks passed
@gumadeiras
Copy link
Copy Markdown
Member

Merged via squash.

Thanks @adhitShet!

vignesh07 pushed a commit to pahdo/openclaw that referenced this pull request Feb 20, 2026
…#21332)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b6c8d1e
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
anisoptera pushed a commit to anisoptera/openclaw that referenced this pull request Feb 20, 2026
…#21332)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b6c8d1e
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
rodrigogs pushed a commit to rodrigogs/openclaw that referenced this pull request Feb 20, 2026
…#21332)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b6c8d1e
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
Hansen1018 added a commit to Hansen1018/openclaw that referenced this pull request Feb 21, 2026
…#21332)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b6c8d1e
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
vincentkoc pushed a commit that referenced this pull request Feb 21, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b6c8d1e
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
vincentkoc pushed a commit that referenced this pull request Feb 21, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b6c8d1e
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
mmyyfirstb pushed a commit to mmyyfirstb/openclaw that referenced this pull request Feb 21, 2026
…#21332)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b6c8d1e
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
obviyus pushed a commit to guirguispierre/openclaw that referenced this pull request Feb 22, 2026
…#21332)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b6c8d1e
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
…#21332)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b6c8d1e
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants