ruby-build icon indicating copy to clipboard operation
ruby-build copied to clipboard

Use yaml from homebrew

Open dreyks opened this issue 4 years ago • 3 comments

Homebrew is no longer located in /usr/local on Apple Silicon. It is now in /opt/homebrew. This leads to brew-originated yaml not being picked up during the build

We should probably manage yaml the same way we do it with readline. Looking at the code there's already a function that should do what is needed but it's not being called anywhere

https://github.com/rbenv/ruby-build/blob/cbdbc6e44be4756df3fc526ee97c1a5ce0632b74/bin/ruby-build#L1029-L1037

should we call it here? https://github.com/rbenv/ruby-build/blob/cbdbc6e44be4756df3fc526ee97c1a5ce0632b74/bin/ruby-build#L581-L583

dreyks avatar Feb 02 '22 17:02 dreyks

That's a good idea! Note that use_homebrew_yaml would have to get wrapped in this condition to prevent overriding user's explicit configuration:

if [[ "$RUBY_CONFIGURE_OPTS" != *--with-libyaml-dir=* ]]

mislav avatar Feb 02 '22 18:02 mislav

Yup, thx. I'll make a PR then

dreyks avatar Feb 02 '22 18:02 dreyks

done https://github.com/rbenv/ruby-build/pull/1929

dreyks avatar Feb 03 '22 18:02 dreyks