Skip to content

Global --output/-o shadows db query CSV and db diff file output in v2.101.0 #5373

@quinton-ops

Description

@quinton-ops

Reproduction (CLI v2.101.0, macOS arm64)

$ supabase db query --linked --agent=no -o csv 'select 1 as ok'
■ Invalid value for flag --output: "csv". Expected: Expected "env" | "pretty" | "json" | "toml" | "yaml", got "csv"

$ supabase db query --linked --agent=no -o table 'select 1 as ok'
■ Invalid value for flag --output: "table". Expected: Expected "env" | "pretty" | "json" | "toml" | "yaml", got "table"

All variants fail identically: --output csv, -o=csv, position-after-SQL, etc. -o json accidentally works only because json is a valid value in both flag definitions.

Scope (verified via --help on installed binary)

Command Command-local -o Status
db query -o (table|json|csv) BROKEN (collides)
db diff -o <file> (string, write to file) BROKEN (collides)
db dump none OK
db push none OK
gen types none OK
db reset --version (per #5350) BROKEN (already filed)

Suggested fix

Either: (a) rename the global --output/-o to avoid the collision (e.g., --status-output), or (b) restore command-local -o precedence over the global. The --output-format global (text|json|stream-json) already covers AI-agent output framing, so the second --output global has limited need.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions