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

Fix prisma migrate cli regression error #8898

Merged
merged 2 commits into from Nov 14, 2023

Conversation

marekryb
Copy link
Contributor

PR #8790 among many things replaced execa with execFile as a way to spawn child process for prisma cli commands.

Unfortunately execFile does not allow inheriting stdin from parent process like before

Prisma commands that require user input (eg. prisma migrate dev or prisma migrate reset) now throw Error: Prisma Migrate has detected that the environment is non-interactive, which is not supported. and there is no flag or option to turn it off (prisma/prisma#4669 prisma/prisma#7113)

Related issues: #8888 #8858

There are at least 3 ways to fix this issue:

  1. Revert code to old version (execa)
  2. Switch to execFileSync
  3. Switch to spawn

I chose the last one. In my limited testing everything seems to work fine. Let me know if other way is preferred instead.

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 99a857a:

Sandbox Source
@keystone-6/sandbox Configuration

@dcousens
Copy link
Member

Thanks for this @marekryb, I'm wondering what we can do to ensure tests capture this regression

@dcousens dcousens self-assigned this Nov 13, 2023
@dcousens dcousens added the 🐛 bug Unresolved bug label Nov 13, 2023
@dcousens dcousens merged commit 871bdcb into keystonejs:main Nov 14, 2023
58 checks passed
@dcousens dcousens mentioned this pull request Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unresolved bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants