Skip to content

Commit

Permalink
Ensure that msys2 bin dir is on PATH for bash
Browse files Browse the repository at this point in the history
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
  • Loading branch information
j.spijker@ultimaker.com authored and jellespijker committed Aug 30, 2022
1 parent dd2965c commit a84bd18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions conans/client/subsystems.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def _windows_bash_wrapper(conanfile, command, env, envfiles_folder):
_msystem = {"x86": "MINGW32"}.get(conanfile.settings.get_safe("arch"), "MINGW64")
msys2_mode_env.define("MSYSTEM", _msystem)
msys2_mode_env.define("MSYS2_PATH_TYPE", "inherit")
msys2_mode_env.prepend_path("PATH", os.path.dirname(shell_path))
path = os.path.join(conanfile.generators_folder, "msys2_mode.bat")
msys2_mode_env.vars(conanfile, "build").save_bat(path)
env.append(path)
Expand Down

0 comments on commit a84bd18

Please sign in to comment.