From a4590dd112705a9b1042d5d03fb253c8b6a5b669 Mon Sep 17 00:00:00 2001 From: dsisnero Date: Mon, 27 Nov 2023 15:59:01 -0700 Subject: [PATCH] Update msys2_installation.rb #iterate_msys_paths prefer ENV["MSYS2_PATH"] if set for #iterate_msys_paths --- lib/ruby_installer/build/msys2_installation.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ruby_installer/build/msys2_installation.rb b/lib/ruby_installer/build/msys2_installation.rb index 81c668222..a3c2d5c14 100644 --- a/lib/ruby_installer/build/msys2_installation.rb +++ b/lib/ruby_installer/build/msys2_installation.rb @@ -46,6 +46,10 @@ def reset_cache end def iterate_msys_paths + # Prefer MSYS2_PATH if ENV set + if ENV["MSYS2_PATH"] + yield ENV["MSYS2_PATH"] + end # Prefer MSYS2 when installed within the ruby directory. yield File.join(RbConfig::TOPDIR, "msys64") yield File.join(RbConfig::TOPDIR, "msys32")