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

feat: Replace Git Bash check with Mintty check #1295

Merged
merged 5 commits into from
Mar 26, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
9 changes: 4 additions & 5 deletions cli/src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,11 @@ 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
if (process.env.TERM_PROGRAM?.toLowerCase().includes("mintty")) {
logger.warn(` WARNING: It looks like you are using Mintty which is non-interactive. Please run create-t3-app with another
iAverages marked this conversation as resolved.
Show resolved Hide resolved
terminal such as Windows Terminal or PowerShell if you want to use the interactive CLI.`);
logger.warn(` WARNING: If you are using Git Bash, please use Git Bash from another terminal, such as Windows Terminal
or the terminal build into Visual Studio Code.`);

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