Open adriatic opened 3 years ago
Do you get the same behaviour if you use the Command Prompt terminal? What if you use PowerShell terminal? I know it works in git-bash, because that's what I use.
Working on all those experiments, with the intent to improve ./vscode/setings file
@Tobbe I looked a bit more around this issue to answer your questions. While I will write more about that in my Developing-Redwood-applications-on-Windos-platform "essay", here is a summary.
yarn rw dev
(this is the case when I got in the trouble described as The command yarn rw prisma migrate dev blocks the cmder terminalI found the only case where the development fails badly without easy recovery (seeThe command yarn rw prisma migrate dev blocks the cmder terminal). So, the recommendation is not to use cmder terminal (with cmd shell) to run the command yarn rw prisma migrate dev
, because the migrate command will lock up the shell.
I plan to determine the sequence of control characters that migrate
CLI generates to prompt the user for the migrate name.
So, the recommendation is not to use cmder terminal (with cmd shell) to run the command yarn rw prisma migrate dev , because the migrate command will lock up the shell.
^^ this is very important to understand and know @adriatic Thank you for the detective work here.
Because the Redwood CLI command rw prisma
is simply a lightweight wrapper around the Prisma CLI, I'm curious if you've actually discovered an issue with Prisma's CLI. Could you try the following:
yarn rw prisma migrate dev
is "Running Prisma CLI:" in green. Below that is the full command being run under the hood, including the flags for --schema and --preview-featureyarn prisma ... ...schema.prisma
and run it on it's own?Very curious to see if that fails in the same way. I'm betting it will.
@adriatic You wrote "the recommendation is not to use cmder terminal (with cmd shell)". What I'm curious to know is if this is a limitation on the cmder+cmd combination, or if it's a limitation with cmd as a shell. Does it work if you run the command in the Command Prompt terminal? (that only and always uses the cmd shell).
@thedavidprice - I will do the experiments you suggest tomorrow (my better half is already declaring a bit of family time)
@Tobbe the problem seems to be a limitation on the cmder+cmd combination
verified by running that line in plain CMD (which does not get locked) as well as in VSCode integrated terminal which also does not get locked. So, it seems that the cmder wrapper around CMD shell gets confused by the control codes that the yarn rw prisma migrate dev
issues. It is also likely that control codes (ASCII < 20h) are unnecessarily complicated that cmder dislikes.
I will resolve all that tomorrow.
Thanks for confirming.
And what shell do you run in the VSCode terminal?
I tried with both, plain CMD and PowerShell - both choices work as expected. That is why I wrote [above[(https://github.com/redwoodjs/redwood/issues/1940#issuecomment-794663141)
"It is also likely that control codes (ASCII < 20h) are unnecessarily complicated that cmder dislikes."
Case 1 - using standalone cmder terminal (cmd shell in cmder terminal)
This case led to my how-to-undo-generator-actions-initiated-in-error post.
I do believe that there is something weird happening with the prompt from the generator code. We shot ourselves in the foot.