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

bug: Terminal is detected incorrectly on windows terminal running Git-Bash #1281

Closed
msyavuz opened this issue Mar 16, 2023 · 2 comments · Fixed by #1295
Closed

bug: Terminal is detected incorrectly on windows terminal running Git-Bash #1281

msyavuz opened this issue Mar 16, 2023 · 2 comments · Fixed by #1295
Labels
💬 discussion Issue needs further discussion before decision

Comments

@msyavuz
Copy link

msyavuz commented Mar 16, 2023

Provide environment information

System:

OS: Windows 10 10.0.19045
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 9.75 GB / 15.88 GB

Binaries:

Node: 16.14.2 - D:\programlar\nodejs\node.EXE
Yarn: 1.22.15 - D:\programlar\nodejs\yarn.CMD
npm: 9.4.2 - D:\programlar\nodejs\npm.CMD

Describe the bug

When i run npm create t3-app@latest from my windows terminal running git-bash, i can only create the default project. Since windows terminal is interactive i expect to be able to see options and choose accordingly.

Reproduction repo

https://github.com/t3-oss/create-t3-app

To reproduce

Run npm create t3-app@latest on a windows terminal running git-bash.

Additional information

This is due to the check of process.env.SHELL containing bash in windows terminal. If a check for terminal instead of shell could be implemented, bug should disappear.

@luisvinicius09
Copy link

luisvinicius09 commented Mar 20, 2023

Apparently, in release 7.5.6 the git-bash was treated as un-interactive (#1222). I couldn't clearly find a reason though.

I used it perfectly inside Windows Terminal last month. I wonder if this is something they are working on or planning to do. I would love to see compatibility with git-bash again.

@c-ehrlich
Copy link
Member

c-ehrlich commented Mar 21, 2023

This is intentional, see #1139

it's possible that the real problem is MinTTY rather than git-bash itself. Feel free to test this and if so open a PR that detects MinTTY and treats it as non interactive instead of git-bash. (the check for it is here).

If you don't want to open a PR and just want a non broken terminal on Windows, use WSL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬 discussion Issue needs further discussion before decision
Projects
None yet
3 participants