Regression in brew ruby -e 'puts "formula_name".f.path
#9362
Labels
outdated
PR was locked due to age
brew ruby -e 'puts "formula_name".f.path
#9362
Bug report
Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew config
andbrew doctor
and included their output with your issue?What you were trying to do (and why)
I have a script that uses
brew ruby -e
to print the path to a homebrew formula. I can evaluate the expression successfully withbrew irb
, but it fails withbrew ruby
. For example, to print the path to theqt
formula on linuxbrew:What happened (include command output)
Though this expression can be evaluated with
brew irb
, it fails withbrew ruby
complaining thatf
is an uninitialized constantString::Formulary
.Command output
What you expected to happen
I expect
brew ruby
to work the same asbrew irb
.Step-by-step reproduction instructions (by running
brew
commands)brew ruby -e 'puts "qt".f.path'
I used
git bisect
to trace the last "good" commit to 6750448 and the regression to 1b9002c. I've added a test in scpeters@b532e79 on top of the "good" commit that can be included in a pull request that fixes this.Output of
brew config
andbrew doctor
commandsThe text was updated successfully, but these errors were encountered: