Maximus5 / ConEmu

Customizable Windows terminal with tabs, splits, quake-style, hotkeys and more
https://conemu.github.io/
BSD 3-Clause "New" or "Revised" License
8.5k stars 570 forks source link

Perhaps new tabs creating through ConEmu64.exe commandline going wrong #2561

Open esaulenka opened 7 months ago

esaulenka commented 7 months ago

Versions

ConEmu build: 230724 x64 OS version: Windows 10 x64 Used shell version: msys2

Problem description

I faced with the problem when tried to add a new msys2 tab to the running ConEmu. In short, msys2 have a few different environments. It is selected on the start by setting environment variable MSYSTEM (with values like MSYS, MINGW64, etc) before launching shell. But as I understood when msys2's startup script launching ConEmu64.exe /Run C:\msys64\usr\bin\bash it uses environment variables got at the first run.

Steps to reproduce

  1. close ConEmu
  2. run C:\msys64\msys2_shell.cmd -conemu -msys
  3. run C:\msys64\msys2_shell.cmd -conemu -mingw64
  4. check that both tabs contains Msys2 environment (check $PATH and $MSYSTEM)
  5. close ConEmu
  6. run C:\msys64\msys2_shell.cmd -conemu -mingw64
  7. run C:\msys64\msys2_shell.cmd -conemu -msys
  8. now shells become MinGW64

Msys launcher located here: https://github.com/msys2/MSYS2-packages/blob/master/filesystem/msys2_shell.cmd