Skip to content

Remove workaround for interactive Prisma #2841

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

Merged
merged 1 commit into from
Jun 16, 2025
Merged

Conversation

cprecioso
Copy link
Member

@cprecioso cprecioso commented Jun 16, 2025

Prisma needs shell interactivity for the prisma migrate dev command, so it will check if the terminal is a TTY and die if it's not.

Prisma used to check if stdout is interactive, instead of stdin. We had a workaround for this, by calling the Prisma executable through the script utility.

This has been fixed since Prisma v4.3.0 (prisma/prisma#14649), they now check for a TTY on stdin, which we have always bequeathed to it.

We can remove our workaround code, and close our issue (prisma/prisma#7113).

@cprecioso cprecioso self-assigned this Jun 16, 2025
@@ -37,7 +37,6 @@ import qualified Wasp.Generator.DbGenerator.Auth as DbAuth
import Wasp.Generator.DepVersions (prismaVersion, superjsonVersion)
import Wasp.Generator.FileDraft (FileDraft)
import qualified Wasp.Generator.FileDraft as FD
import qualified Wasp.Generator.JsImport as GJI
Copy link
Member Author

@cprecioso cprecioso Jun 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unrelated, someone left an unused import here and the compiler was complaining.

Copy link
Member

@Martinsos Martinsos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow great, they fixed it!
Approved, but one question: will this work ok when prisma migrate-dev asks for a migration name? It can do that when you do initial migration, it often (although I think not always) asks for a name -> will user be able to input it? I think they should, just checking due to using runPrismaCommandAsJob... now instead of runNodeCommandAsJob. But I think the first one uses the second one internally anyway, so if so we should be good. Just being extra cautious here.

Awesome!

@cprecioso
Copy link
Member Author

I did try it before sending the PR 😁
Screen Recording 2025-06-16 at 17 50 17

@cprecioso cprecioso merged commit 01ef0ce into main Jun 16, 2025
7 checks passed
@cprecioso cprecioso deleted the cprecioso/push-rmwtsrklmvrs branch June 16, 2025 15:52
@Martinsos
Copy link
Member

Awesome! I was sure you did but I remember it not always asking for name so wanted to make sure. Nice stuff!

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.

2 participants