From 81e062e77d7bf24cbcf0f206d4d48c90aa320746 Mon Sep 17 00:00:00 2001 From: romw314 <106016361+romw314@users.noreply.github.com> Date: Thu, 3 Aug 2023 14:36:51 +0200 Subject: [PATCH] Remove space in regex from msys2_installation.rb The space does not look good because I have the value in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\{a93ceac8-6f93-47bd-adbf-d1cb0953d6cf}\DisplayName only "MSYS2" (without quotes), not "MSYS2 " --- lib/ruby_installer/build/msys2_installation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ruby_installer/build/msys2_installation.rb b/lib/ruby_installer/build/msys2_installation.rb index 81c668222..f92ab2a1a 100644 --- a/lib/ruby_installer/build/msys2_installation.rb +++ b/lib/ruby_installer/build/msys2_installation.rb @@ -71,7 +71,7 @@ def iterate_msys_paths reg.each_key do |subkey| subreg = reg.open(subkey) begin - if subreg['DisplayName'] =~ /^MSYS2 / && File.directory?(il=subreg['InstallLocation']) + if subreg['DisplayName'] =~ /^MSYS2/ && File.directory?(il=subreg['InstallLocation']) yield il end rescue Encoding::InvalidByteSequenceError, Win32::Registry::Error