-
Notifications
You must be signed in to change notification settings - Fork 349
Description
Describe the bug
When running the Supabase CLI command to generate types, the CLI did not prompt any interactive questions in the terminal. Instead, the interactive prompt text itself was written directly into the generated types.ts file.
To Reproduce
Steps to reproduce the behavior:
Open a terminal in a Supabase project
Run the command:
npx supabase gen types > ./src/integrations/supabase/types.ts
Observe the terminal output
Open ./src/integrations/supabase/types.ts
See that the interactive question text is written into the file instead of valid TypeScript types
Expected behavior
The CLI should ask the interactive questions in the terminal (e.g. selecting project, database, or schema), and only write the generated TypeScript definitions to types.ts after the questions are answered.
Screenshots
N/A
System information
Rerun the failing command with --create-ticket flag.
Ticket ID: N/A
Version of OS: N/A
Version of CLI: N/A
Version of Docker: N/A
Versions of services: N/A
Additional context
Browser: N/A
@supabase/ssr: ^0.7.0
@supabase/supabase-js: ^2.75.1
Node.js: v24.12.0
This issue seems related to redirecting stdout (> types.ts) while the CLI expects to run in interactive mode.