msys2

How can I start an MSYS2 console on cmd in current directory?


I installed MSYS2, but I can't run msys2 console on cmd in current directory.

This is what I tried in cmd console:

cd path/to/mypath
msys2 -mingw64 

The mingw64 console does not run on path/to/mypath directory but in its own default path.


Solution

  • You can edit msys2.ini, mingw32.ini, or mingw64.ini and add this line to it:

    CHERE_INVOKING=1
    

    More information is in the README of msys2-launcher.