workshop-template icon indicating copy to clipboard operation
workshop-template copied to clipboard

Setting up git in the default Windows console cannot run nano

Open mlell opened this issue 4 years ago • 0 comments

The Windows documentation to install git bash says that bit bash shall run in the Windows CMD window, and not in the MinTTY window that comes with git bash.

Install instructions:

https://github.com/carpentries/workshop-template/blob/fdd546369650ad8369cb2b0ca45b29f5c1ccc4bd/_includes/install_instructions/shell.html#L64-L66

This causes a problem on my machine (Windows 10 Version 1809 Build 17763.2300), namely that nano does not display but a blank black screen with a white cursor in the top left. The window can only be closed. This prevents almost everything that can be done in the git and shell lessons.

Steps to reproduce:

  1. Install git for windows 2.24.1-64-bit, checking "Use Windows' default console window" as described in this repo
  2. Start "git bash"
  3. execute "nano"

Expected outcome: See nano

Actual outcome: Nothing is displayed

To my knowledge, this setting cannot be changed once git is installed. I would suggest to replace this part by

Ensure that "Use MinTTY (the default terminal of MSYS2)" is checked

Downsides of this approach according to the installer is that

Windows console programs (such as interactive Python) must be launched via winpty to work in MinTTY

But this seems to me the lesser restriction compared to a non-functional nano. Also, there is an experimental option that works around this issue.

mlell avatar Jan 12 '22 14:01 mlell