MSYS2-packages: MSYS2 pipes have stopped working in Microsoft Windows cmd.exe shell

Hi, I updated my MSYS2 installation two or three months ago, I think. Everything went fine.

About two weeks ago I updated my MSYS2 installation again. My Windows batch scripts use MSYS2 commands, and they stopped working.

If I open the Windows command prompt/shell cmd.exe and run individual commands like printf "a" everything looks fine.

If I try to run concatenated commands like printf "a" | grep "a" it fails about once every three times. The command never ends, I get a blinking cursor with no output and no prompt. CTRL-C, CTRL-Z, CTRL-Q, CTRL-E do not return the prompt.

If the command has more pipes printf "a" | grep "a" | grep "a", it fails much more frequently.

These concatenated commands work fine when I use the bash shell. It seems that they also work with PowerShell, although I have tested them fewer times.

I updated Windows 10 x64 , rebooted, and reinstalled MSYS2. The problem persists. I also installed MSYS2 in a virtual machine with Windows 7 x64. The problem remains.

If I replace my updated C:\msys64\ folder by a year-old C:\msys64\ the problem disappears. Of course, some packages can not be installed in this older MSYS2, and I can’t update it.

Best regards

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 16 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks, @mingwandroid, for these helpful directions. Though we never had a chance to meet, this isn’t the first time you’ve helped someone with some little thing, and I’m sure it won’t be the last. RIP, fellow nerd.