Msys2-packages: Uncommenting MSYS2_PATH_TYPE=inherit in msys2.ini does not have any effect

Created on 3 Sep 2020  路  11Comments  路  Source: msys2/MSYS2-packages

Describe the bug

I am trying to inherit the W10 PATH in MSYS2, however, uncommenting MSYS2_PATH_TYPE=inherit in msys2.ini does not have any effect. The MSYS2 path is unchanged from the minimalistic starting one. The same happens with mingw32.ini and mingw64.ini.

My guess is that there is some inconsistency that crept in the msys2_shell.cmd script.

Note that this is a fresh MSYS2 installation.

Any clues about how this is happening?

Thanks

Marco

Most helpful comment

Yep. This is a bug. No other ways to describe it.

All 11 comments

I believe those ini files only apply to the msys2-launcher exes, not to msys2_shell.cmd batch script.

You need to pass -use-full-path to msys2_shell.cmd

You need to pass -use-full-path to msys2_shell.cmd

I don't launch from the command line. I am not sure what gets invoked "out of the box" by double clicking on the shortcut (o) or from the Start menu, but I would expect that a .ini file should work; both from the CLI or from the GUI.

(o) I know I can find out. But (1) I am lazy and (2) time is a tyrant (oo)
(oo) Yes, I also develop and maintain FOSS. I know the drill etc etc, YMMV etc etc :) :)

ok, thanks, I think the shortcut just calls msys2_shell.cmd, so you'd have to edit the shortcut

ok, thanks, I think the shortcut just calls msys2_shell.cmd, so you'd have to edit the shortcut

Yes. I know.

But that is not what I want. I want the uncommenting of the MSYS2_PATH_TYPE in the .ini to work as expected.

Moreover, if I clicked on the actual program and not on the shortcut I would have a different behavior.

Understood. Thy are currently two different things https://packages.msys2.org/package/msys2-launcher?repo=msys&variant=x86_64 and the installer, so not that easy.

I urge you to unify them. Users do not like surprises.

MSYS2 is open source, instead of urging others to do something, perhaps you could try to fix this? It would be very welcome.

Look. I understand you may have felt that the word "urge" was a tad strong. Having said that, as I said before, I know the drill for FOSS.

It would take me quite an investment in time to be able to fix this, even if the fix may be three lines of code. Alas, time is a tyrant.

As it is it is an open bug. Just keep it as such until it gets fixed.

All the best

OK, I have to agree with @marcoxa here - this behavior is extremely surprising and prone to causing many people headaches:

  • There's an ini file, it's documented, it has the "inherit" option I need right there, commented.
  • When I edit it (uncomment the line) and double-click on the "msys2.exe" file right next to it everything behaves as expected, I now get the path behavior I needed in this window
  • I finish what I was doing, go do other things
  • Sometime later, I open msys2 again the way I always have, the "normal" windows way: Windows key, type "msys", hit enter.
  • The resulting window seems to have "forgotten" the change I made before - and I can spend a good long while understanding that these are different ways of opening msys2, and that the "ini" file is simply not supported for the standard windows shortcut...

Yep. This is a bug. No other ways to describe it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Dwitee picture Dwitee  路  7Comments

urbster1 picture urbster1  路  7Comments

EdVanDance picture EdVanDance  路  6Comments

trapd00r picture trapd00r  路  3Comments

ffes picture ffes  路  8Comments