Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db push not defaulting to yes in non-interactive shell as part of a package.json script called by turbo in GitHub action #2238

Closed
psteinroe opened this issue May 3, 2024 · 1 comment · Fixed by #2318

Comments

@psteinroe
Copy link

Describe the bug
With the recent change, supabase db push asks for a confirmation. I looked at the PR (#1978) and it should automatically default to yes in a non-interactive shell. Unfortunately, that does not seem the case if it's part of a package.json script.

We have a turbo-powered monorepo, and supabase is a package in that repo. To deploy, we call the deploy script in all packages. For supabase, it looks like this:

    "deploy": "supabase link --project-ref $SUPABASE_PROJECT_REF && supabase db push --debug",

But this hangs forever. It can be fixed by using yes:

    "deploy": "supabase link --project-ref $SUPABASE_PROJECT_REF && yes | supabase db push --debug",

To Reproduce
Steps to reproduce the behavior:

  1. Put supabase db push into a package json script
  2. Call it from turbo within a GitHub Action runner

Expected behavior
Should default to yes. Or: provide a --non-interactive flag so that the user can explicitly set the mode.

System information

  • Version of CLI: 1.164.1
@sweatybridge
Copy link
Contributor

The was indeed a breaking change. I think the root cause is deploy script launching supabase as a child process without closing stdin.

I will fix it in the next release.

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 a pull request may close this issue.

2 participants