-
Notifications
You must be signed in to change notification settings - Fork 994
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
[bug] ensure that the msys2 bin folder is added to PATH before calling bash.exe #11986
Comments
Will open up a PR for the proposed fix. |
This should prepend the root directory of msys bin dir, on which the bash.exe is located, as well as tools such as `printenv`. Fixes conan-io#11986
Not sure it's a conan issue, it's a an issue in msys2 recipe in conan-center, you have forgotten to add this folder to cpp_info.bindirs in your fork. AFAIK, in conan v2 |
Thank you, will cont. working from your new msys2 recipe, to check if this is still an issue then. If not, then I will close the issue and PR |
@SpaceIm you're correct. Using your new msys2 conan recipe for msys2 fixed this issue. I will close this issue and the PR |
Mhh, but what if someone is using their own msys2 installation? E.g. the profile I'm currently using while trying to get a build working on msys is:
And if I start the So should that PR or a different solution maybe be reconsidered? |
Came across this while trying to modernize the msys2 recipe See reproduction steps)
When using the
buildenv_info
instead ofenv_info
Setting the toolchains shell scripts in the bash resulted in errors thatprintenv
couldn't be found. This is because thePATH
variable doesn't contain the PATH to the msys2......../bin/msys2/usr/bin
yet.I think the PATH containing the msys2 bins should be added to the environment as soon as possible in this chain. I think a possible solution is to prepend the directory of the
shell_path
, since theMSYS2_PATH_TYPE
is set to inherit thebash.exe
will be aware of all the other programs.conan/conans/client/subsystems.py
Line 63 in 2d3f151
Downside of this is that the shell script which will be activated in the bash environment will also restore that path if the deactivation script is called. But I think that won't be a huge issue, because (as far as I'm aware) all the bash commands are called as single shot commands.
I don't know exactly how this will affect setups which use their own msys2 environment and don't specify the full path for the
tools.microsoft.bash:path
configurationEnvironment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
Logs (Executed commands with output) (Include/Attach if Applicable)
Closely relates to #11980
The text was updated successfully, but these errors were encountered: