Skip to content

fix: warn to stderr when unknown --format value is provided (fixes #38)#49

Merged
jpoehnelt merged 1 commit intomainfrom
fix/unknown-format-warning
Mar 4, 2026
Merged

fix: warn to stderr when unknown --format value is provided (fixes #38)#49
jpoehnelt merged 1 commit intomainfrom
fix/unknown-format-warning

Conversation

@jpoehnelt
Copy link
Copy Markdown
Member

Fixes #38

Changes

  • Added OutputFormat::parse(s) -> Result<Self, String> which returns Err for unknown format strings
  • Updated main.rs to call the new parse() method and print a clear warning to stderr when an unknown format is supplied, then fall back to JSON
  • Added unit tests for both the happy path and the unknown-format error path
  • from_str is retained as a convenience wrapper (silent fallback) for any internal callers

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 4, 2026

🦋 Changeset detected

Latest commit: ee35e4a

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jpoehnelt jpoehnelt force-pushed the fix/unknown-format-warning branch from 578a5d7 to ee35e4a Compare March 4, 2026 07:54
@jpoehnelt jpoehnelt merged commit ab6c45e into main Mar 4, 2026
22 checks passed
@jpoehnelt jpoehnelt deleted the fix/unknown-format-warning branch March 4, 2026 08:01
shigechika pushed a commit to shigechika/gws-cli that referenced this pull request Mar 20, 2026
…n-format-warning

fix: warn to stderr when unknown --format value is provided (fixes googleworkspace#38)
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.

ux: unknown --format value silently falls back to JSON without any warning

1 participant