Skip to content

Commit d0a8143

Browse files
authored
feat: Replace Git Bash check with Mintty check (#1295)
* Replace gitbash check with mintty check * Fix spacing of message * Add changeset * Change warning message
1 parent 49c31b5 commit d0a8143

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Diff for: .changeset/smart-cherries-try.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-t3-app": minor
3+
---
4+
5+
Replace Git Bash check with Mintty check

Diff for: cli/src/cli/index.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,10 @@ export const runCli = async () => {
157157

158158
// Explained below why this is in a try/catch block
159159
try {
160-
if (
161-
process.env.SHELL?.toLowerCase().includes("git") &&
162-
process.env.SHELL?.includes("bash")
163-
) {
164-
logger.warn(` WARNING: It looks like you are using Git Bash which is non-interactive. Please run create-t3-app with another
165-
terminal such as Windows Terminal or PowerShell if you want to use the interactive CLI.`);
160+
if (process.env.TERM_PROGRAM?.toLowerCase().includes("mintty")) {
161+
logger.warn(` WARNING: It looks like you are using MinTTY, which is non-interactive. This is most likely because you are
162+
using Git Bash. If that's that case, please use Git Bash from another terminal, such as Windows Terminal. Alternatively, you
163+
can provide the arguments from the CLI directly: https://create.t3.gg/en/installation#experimental-usage to skip the prompts.`);
166164

167165
const error = new Error("Non-interactive environment");
168166
// eslint-disable-next-line @typescript-eslint/no-explicit-any

0 commit comments

Comments
 (0)