You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
support --params @file.json and --params - for the raw api command and generated service commands
support --data @file.json and --data - on the same paths
centralize structured JSON input resolution, update help text, and add coverage for file/stdin inputs
Why
On Windows PowerShell, inline JSON like --params '{"foo":"bar"}' can reach native executables with the inner double quotes stripped, so the CLI receives {foo:bar} instead of valid JSON.
That means the failure happens before request construction, and the CLI cannot reliably reconstruct the lost quoting. This change takes the smallest reliable path by adding deterministic cross-platform alternatives: @file and stdin (-).
Validation
go test ./internal/cmdutil ./cmd/api ./cmd/service
go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6 run --new-from-rev=origin/main
Notes
go test -race -gcflags="all=-N -l" -count=1 ./cmd/... ./internal/... ./shortcuts/... could not be run in this Windows environment because gcc/cgo is not installed.
A broader go test -count=1 ./cmd/... ./internal/... ./shortcuts/... run on Windows hit existing unrelated failures in packages such as cmd/auth, internal/validate, and shortcuts/mail/draft.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You have signed the CLA already but the status is still pending? Let us recheck it.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f9414b55-8cf0-4fae-a4cd-d4425e02ed81
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
🔍 Trigger review
✨ Finishing Touches🧪 Generate unit tests (beta)
Create PR with unit tests
Comment @coderabbitai help to get the list of available commands and usage tips.
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
size/LLarge or sensitive change across domains or core paths
2 participants
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
--params @file.jsonand--params -for the rawapicommand and generated service commands--data @file.jsonand--data -on the same pathsWhy
On Windows PowerShell, inline JSON like
--params '{"foo":"bar"}'can reach native executables with the inner double quotes stripped, so the CLI receives{foo:bar}instead of valid JSON.That means the failure happens before request construction, and the CLI cannot reliably reconstruct the lost quoting. This change takes the smallest reliable path by adding deterministic cross-platform alternatives:
@fileand stdin (-).Validation
go test ./internal/cmdutil ./cmd/api ./cmd/servicego run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6 run --new-from-rev=origin/mainNotes
go test -race -gcflags="all=-N -l" -count=1 ./cmd/... ./internal/... ./shortcuts/...could not be run in this Windows environment becausegcc/cgo is not installed.go test -count=1 ./cmd/... ./internal/... ./shortcuts/...run on Windows hit existing unrelated failures in packages such ascmd/auth,internal/validate, andshortcuts/mail/draft.Refs #64