diff --git a/.changeset/smart-cherries-try.md b/.changeset/smart-cherries-try.md new file mode 100644 index 0000000000..bbb3511c39 --- /dev/null +++ b/.changeset/smart-cherries-try.md @@ -0,0 +1,5 @@ +--- +"create-t3-app": minor +--- + +Replace Git Bash check with Mintty check diff --git a/cli/src/cli/index.ts b/cli/src/cli/index.ts index d7ea8396ac..7d995594ec 100644 --- a/cli/src/cli/index.ts +++ b/cli/src/cli/index.ts @@ -157,12 +157,10 @@ export const runCli = async () => { // Explained below why this is in a try/catch block try { - if ( - process.env.SHELL?.toLowerCase().includes("git") && - process.env.SHELL?.includes("bash") - ) { - logger.warn(` WARNING: It looks like you are using Git Bash which is non-interactive. Please run create-t3-app with another - terminal such as Windows Terminal or PowerShell if you want to use the interactive CLI.`); + if (process.env.TERM_PROGRAM?.toLowerCase().includes("mintty")) { + logger.warn(` WARNING: It looks like you are using MinTTY, which is non-interactive. This is most likely because you are + using Git Bash. If that's that case, please use Git Bash from another terminal, such as Windows Terminal. Alternatively, you + can provide the arguments from the CLI directly: https://create.t3.gg/en/installation#experimental-usage to skip the prompts.`); const error = new Error("Non-interactive environment"); // eslint-disable-next-line @typescript-eslint/no-explicit-any