Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinning (and running from explorer) broken #26

Open
AeliusSaionji opened this issue Oct 26, 2022 · 1 comment
Open

Pinning (and running from explorer) broken #26

AeliusSaionji opened this issue Oct 26, 2022 · 1 comment

Comments

@AeliusSaionji
Copy link

Hello!

I'm on Windows 10.

If I run the exe by double clicking from explorer, I get dumped into /.
If I run msys2.exe from cmd, it correctly navigates to my $HOME as defined in /etc/nsswitch.conf
If I pin this running process, later invocations dump me into /.

The CHERE value in msys2.ini has no effect.
The msys2.ini values do show up in the terminal environment

Here is the created shortcut
image

Thanks!

@elieux
Copy link
Member

elieux commented Jan 21, 2023

Sorry for the late response.

AFAICT your observations are correct but not the deduction. My testing shows that you always start in the CWD:

If I run the exe by double clicking from explorer, I get dumped into /.

Because it starts in C:\tools\msys64 which inside MSYS2 is /.

If I run msys2.exe from cmd, it correctly navigates to my $HOME as defined in /etc/nsswitch.conf

Because Cmd starts in your %USERPROFILE% which I think you've set up as your $HOME inside MSYS2.

If I pin this running process, later invocations dump me into /.

Because as seen on the screenshot, the working directory is again set to C:\tools\msys64 which inside MSYS2 is /.


Do you by any chance have CHERE_INVOKING set up globally?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants