Skip to content

Commit 5d68faa

Browse files
authored
Fix compatibility of MSYS2 dependency installer with bundler
Bundler calls the `Gem.pre_install hook`, but always sets `:ignore_dependencies=>true` in the options. That's why `bundle install` didn't respect `msys2_mingw_dependencies` in gemspec metadata. There is no option in bundler to ignore dependencies, so that pacman installation is now forced in the bundler case.
1 parent 1435e9d commit 5d68faa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

resources/files/operating_system.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Gem.pre_install do |gem_installer|
66
RubyInstaller::Runtime.enable_msys_apps(for_gem_install: true) unless gem_installer.spec.extensions.empty?
77

8-
unless gem_installer.options && gem_installer.options[:ignore_dependencies]
8+
if !gem_installer.options || !gem_installer.options[:ignore_dependencies] || gem_installer.options[:bundler_expected_checksum]
99
[['msys2_dependencies' , :install_packages ],
1010
['msys2_mingw_dependencies', :install_mingw_packages]].each do |metakey, func|
1111

0 commit comments

Comments
 (0)