leanprover / leanprover/lean4

Git Bash/mintty is not recognized as a tty on Windows

Open
#5,553 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P-low
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

When invoking lake build inside Git Bash on Windows Server 2022, Lake's ANSI autodetection decides that the terminal is not a tty and uses the non-interactive format for status messages.

The problem is reproducible when using the Git Bash backed by mintty 3.7.6 on the FRO Windows machine.

The problem is not present on the FRO Windows machine in the following scenarios:

  • Git Bash inside VS Code
  • CLANG64 shell backed by mintty 3.7.4
  • PowerShell

Previously there was an older version of Git for Windows installed on the FRO machine that shipped with mintty 3.7.1 and there the problem was also reproducible. So unless the bug is there in mintty 3.7.1 and 3.7.6 but not in 3.7.4, this seems to be a problem with Git for Windows and not with upstream mintty.

Expected behavior: lake build and lake build --ansi are equivalent when calling from Git Bash

Actual behavior: lake build and lake build --no-ansi are equivalent when calling from Git Bash

Versions

Windows Server 2022 Version 21H2 (OS Build 20348.1487)

Lean (version 4.12.0-rc1, x86_64-w64-windows-gnu, commit e9e858a44849, Release)

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing lake build and comparing it with lake build --ansi in Git Bash backed by mintty on Windows. Trace Lake's ANSI autodetection and compare the terminal behavior with the listed PowerShell, VS Code Git Bash, and CLANG64 scenarios; done means Git Bash treats lake build and lake build --ansi equivalently without regressing the other environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, shell
Domain
build-system, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.