```ruby
        result = if query
          tap_dir.find_formula do |child|
            if child.basename(".rb").to_s == query
              break child.basename(".rb").to_s
            end
          end
        else
          ""
        end
```