Problem
prisma migrate dev can't be used programatically due to it refusing to execute when it recognizes it is not running interactively.
Specifically, we are calling it (at https://github.com/wasp-lang/wasp) as a process from our CLI, and we pipe both stdin and stdout, so interactivity is preserved, but prisma migrate dev sees that stdout is piped and refuses to execute.
Suggested solution
Add --allow-non-interactive flag that skips checks that stop execution when environment is not interactive.
Alternatives
Tricking prisma migrate dev when calling it to think it is running in a TTY -> allegedly script command should work, but we haven't tried it yet and it doesn't behave exactly the same on all OS-es.
Additional context
I initially wrote about it here #4669 (comment) . Based on #4669 it seems others are also having issues when wanting to use prisma migrate dev programatically from helper scripts and similar.
I understand that the idea behind the current behaviour is to prevent using prisma migrate dev for production purposes (e.g. during CI), but it is also stopping any kind of programmatic usage. It makes sense to add flag that allows developers to override this behaviour.
Problem
prisma migrate devcan't be used programatically due to it refusing to execute when it recognizes it is not running interactively.Specifically, we are calling it (at https://github.com/wasp-lang/wasp) as a process from our CLI, and we pipe both stdin and stdout, so interactivity is preserved, but
prisma migrate devsees that stdout is piped and refuses to execute.Suggested solution
Add
--allow-non-interactiveflag that skips checks that stop execution when environment is not interactive.Alternatives
Tricking
prisma migrate devwhen calling it to think it is running in a TTY -> allegedlyscriptcommand should work, but we haven't tried it yet and it doesn't behave exactly the same on all OS-es.Additional context
I initially wrote about it here #4669 (comment) . Based on #4669 it seems others are also having issues when wanting to use
prisma migrate devprogramatically from helper scripts and similar.I understand that the idea behind the current behaviour is to prevent using
prisma migrate devfor production purposes (e.g. during CI), but it is also stopping any kind of programmatic usage. It makes sense to add flag that allows developers to override this behaviour.