Skip to content

fix: make export pretty flag explicit#291

Open
SlaVKsVolks wants to merge 1 commit into
CortexLM:mainfrom
SlaVKsVolks:codex/export-pretty-format-validation
Open

fix: make export pretty flag explicit#291
SlaVKsVolks wants to merge 1 commit into
CortexLM:mainfrom
SlaVKsVolks:codex/export-pretty-format-validation

Conversation

@SlaVKsVolks
Copy link
Copy Markdown

Fixes PlatformNetwork/bounty-challenge#53204.

Changes:

  • Makes export --pretty an explicit opt-in instead of defaulting JSON output to pretty formatting.
  • Narrows the help text to JSON output only.
  • Rejects --pretty for YAML/CSV so the flag is no longer silently ignored for those formats.
  • Adds parser/validation coverage for the new behavior.

Verification:

  • rustfmt --edition 2024 --check src/cortex-cli/src/export_cmd.rs
  • cargo check -p cortex-cli
  • git diff --check

Note: targeted cargo test for export_cmd currently fails before reaching these tests because src/cortex-cli/src/agent_cmd/tests.rs imports private read_file_with_encoding on origin/main.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CLI][v0.0.7] cortex export --pretty is misleading: defaults on for JSON, no-op for YAML/CSV

1 participant