Skip to content

fix(cli): make export --pretty meaningful#336

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-export-pretty-flag
Open

fix(cli): make export --pretty meaningful#336
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-export-pretty-flag

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Fixes PlatformNetwork/bounty-challenge#53204.

Summary

  • make cortex export JSON compact by default so --pretty has a visible effect
  • narrow the help text to JSON and reject --pretty with YAML/CSV before reading session data
  • keep YAML/CSV serialization unchanged when --pretty is not provided
  • fix a stale test import that prevented the cortex-cli test binary from compiling

Validation

  • cargo +stable check --package cortex-cli --lib
  • cargo +stable fmt --package cortex-cli --check
  • cargo +stable test --package cortex-cli export_cmd::tests (8 passed)
  • git diff --check

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