Skip to content

Commit

Permalink
feat: Replace Git Bash check with Mintty check (#1295)
Browse files Browse the repository at this point in the history
* Replace gitbash check with mintty check

* Fix spacing of message

* Add changeset

* Change warning message
  • Loading branch information
iAverages committed Mar 26, 2023
1 parent 49c31b5 commit d0a8143
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/smart-cherries-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-t3-app": minor
---

Replace Git Bash check with Mintty check
10 changes: 4 additions & 6 deletions cli/src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

1 comment on commit d0a8143

@vercel
Copy link

@vercel vercel bot commented on d0a8143 Mar 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.