Skip to content

Commit

Permalink
Update msys2_installation.rb #iterate_msys_paths
Browse files Browse the repository at this point in the history
prefer ENV["MSYS2_PATH"] if set for #iterate_msys_paths
  • Loading branch information
dsisnero authored Nov 27, 2023
1 parent 1037499 commit a4590dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ruby_installer/build/msys2_installation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit a4590dd

Please sign in to comment.