How can I access a resource or file from one Homebrew formula in another's `install`?

I have one formula "A" that installs stuff in its share directory, and I want to know how to read the directory from another formula("B")'s install. Is it possible?

Do I need to install A's resources into etc. instead of share? Or how can I share data between packages?

I would use B's data as a resource, but it's got its own build process, so then I thought having its own formula would be better.

Thanks in advance!


Solution 1:

I got an answer here: https://github.com/Homebrew/discussions/discussions/1636

tl;dr: Use Formula["a"].share. The index is a lower camel case string.