Skip to content

fix: write interactive prompts to stderr when stdout is redirected#4750

Merged
sweatybridge merged 2 commits intosupabase:developfrom
7ttp:fix/parser-atomic-and-stdout
Feb 2, 2026
Merged

fix: write interactive prompts to stderr when stdout is redirected#4750
sweatybridge merged 2 commits intosupabase:developfrom
7ttp:fix/parser-atomic-and-stdout

Conversation

@7ttp
Copy link
Copy Markdown
Contributor

@7ttp 7ttp commented Jan 22, 2026

Summary

Fixes interactive prompts being written to output files when using stdout redirection with supabase gen types.

Problem

When running supabase gen types > types.ts, the interactive project reference prompt was being written to the output file instead of the terminal. This corrupted the generated TypeScript file with prompt text.

Solution

Interactive prompts now always write to stderr by passing tea.WithOutput(os.Stderr) to the Bubble Tea program in project_ref.go. This ensures prompts remain visible in the terminal while keeping stdout clean for piped output.

Related

@7ttp 7ttp requested a review from a team as a code owner January 22, 2026 06:29
Comment thread internal/utils/flags/project_ref.go Outdated
@7ttp 7ttp force-pushed the fix/parser-atomic-and-stdout branch from 5ef206a to 1ed55d0 Compare January 22, 2026 08:59
@7ttp 7ttp requested a review from sweatybridge January 23, 2026 15:27
@7ttp
Copy link
Copy Markdown
Contributor Author

7ttp commented Feb 2, 2026

@sweatybridge
(sorry for the ping!)
Can u please have another look at this? 😅🙌

@sweatybridge sweatybridge merged commit 9c3d835 into supabase:develop Feb 2, 2026
15 of 17 checks passed
@7ttp 7ttp deleted the fix/parser-atomic-and-stdout branch February 2, 2026 14:28
@AliYar-Khan
Copy link
Copy Markdown

Is this fix released?

@sweatybridge
Copy link
Copy Markdown
Contributor

Yes it's on the latest cli v2.75.1

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.

Supabase CLI command to generate types failing

3 participants