MSYS2-packages icon indicating copy to clipboard operation
MSYS2-packages copied to clipboard

filesystem: Use working directory only if it is applicable

Open orgads opened this issue 1 year ago • 9 comments

Check for both msys-2.0.dll and bash.exe. Otherwise, use the script directory. Some applications install msys2 runtime as a dependency, while it is not a full msys environment.

orgads avatar Feb 12 '24 07:02 orgads

What issue does this fix?

Biswa96 avatar Feb 12 '24 07:02 Biswa96

I tried to state it in the commit message. I guess it was not enough.

When I run C:/msys64/msys2_shell.cmd -mingw64 -defterm -no-start from a directory that has msys-2.0.dll, but doesn't have bash.exe, it fails with this error:

'"F:\Utils\\bash"' is not recognized as an internal or external command,
operable program or batch file.

orgads avatar Feb 12 '24 07:02 orgads

What does the directory have? What do you want to do with the msys2_shell.cmd if that directory does not have any shell?

Biswa96 avatar Feb 12 '24 07:02 Biswa96

I just want to start a shell, and I happened to run from this directory.

It has a utility that is built with msys, so I need the msys runtime there.

orgads avatar Feb 12 '24 07:02 orgads

What's the verdict?

orgads avatar Feb 14 '24 20:02 orgads

@Biswa96?

orgads avatar Mar 02 '24 20:03 orgads

I can not understand the situation clearly. Please wait for other to comment :pray:

Biswa96 avatar Mar 02 '24 20:03 Biswa96

I'll try to explain with an example:

  • Build sipp with msys
  • Copy sipp.exe and all its DLL dependencies (including msys-2.0.dll) to C:\sipp
  • cd /d C:\sipp
  • Run C:\msys64\msys2_shell.cmd -defterm -no-start
C:\sipp>C:\msys64\msys2_shell.cmd -defterm -no-start
'"C:\sipp\\bash"' is not recognized as an internal or external command,
operable program or batch file.

orgads avatar Mar 02 '24 20:03 orgads

ping? @Biswa96 / @lazka

orgads avatar Mar 11 '24 07:03 orgads