diff --git a/configs/components/puppet-runtime.rb b/configs/components/puppet-runtime.rb index 8be405b7ff..8404c5ce6b 100644 --- a/configs/components/puppet-runtime.rb +++ b/configs/components/puppet-runtime.rb @@ -45,7 +45,12 @@ pkg.build_requires 'pl-ruby' elsif platform.is_macos? ruby_version_y = settings[:ruby_version].gsub(/(\d+)\.(\d+)\.(\d+)/, '\1.\2') - pkg.build_requires "ruby@#{ruby_version_y}" + # Pin to an older version of ruby@2.7. This can be removed once we're no longer cross-compiling + if ruby_version_y == "2.7" + pkg.build_requires "puppetlabs/puppet/ruby@2.7" + else + pkg.build_requires "ruby@#{ruby_version_y}" + end end end