title: homebrew locate installed files path
body: <p>I have a <a href="https://brew.sh/" rel="nofollow noreferrer">homebrew</a> package that I was able to push through <a href="https://github.com/" rel="nofollow noreferrer">GitHub</a>: <a href="https://github.com/cccnrc/homebrew-diagnosticator" rel="nofollow noreferrer">diagnosticator</a></p>
  <p>This is a simple <a href="https://www.ruby-lang.org" rel="nofollow noreferrer">ruby</a> file (<a href="https://github.com/cccnrc/homebrew-diagnosticator/blob/main/diagnosticator.rb" rel="nofollow noreferrer">diagnosticator.rb</a>) that points to the actual hosting repository: <a href="https://github.com/cccnrc/diagnosticator-mac" rel="nofollow noreferrer">diagnosticator-mac</a> and provides instructions on how to install files:</p>
  <pre class="lang-rb prettyprint-override"><code>class Diagnosticator &lt; Formula
    desc &quot;Diagnosticator Mac OS homebrew package&quot;
    homepage &quot;https://diagnosticator.com&quot;
    url &quot;https://github.com/cccnrc/diagnosticator-mac/archive/refs/tags/v0.1.11.tar.gz&quot;
    sha256 &quot;f36987ce96c7be269da12b9dce8186c5245aef4046fe62173a145024b5e88b98&quot;
    license &quot;MIT&quot;
  
    depends_on &quot;docker&quot;
    depends_on &quot;docker-compose&quot;
    depends_on &quot;wget&quot;
    depends_on &quot;jq&quot;
  
    def install
      bin.install &quot;diagnosticator&quot;
      bin.install &quot;diagnosticator-mac.sh&quot;
      bin.install Dir[&quot;files&quot;]
      prefix.install &quot;README.md&quot;
    end
  end
  </code></pre>
  <p>From the <a href="https://github.com/cccnrc/diagnosticator-mac/blob/main/diagnosticator" rel="nofollow noreferrer">diagnosticator executable</a> I have to refer to <a href="https://github.com/cccnrc/diagnosticator-mac/blob/main/diagnosticator-mac.sh" rel="nofollow noreferrer">diagnosticator-mac.sh executable</a>, I am now referring it as:</p>
  <pre class="lang-sh prettyprint-override"><code>MAC_EXE=/usr/local/bin/diagnosticator-mac.sh
  </code></pre>
  <p>but I guess I can simply change it to:</p>
  <pre class="lang-sh prettyprint-override"><code>MAC_EXE=diagnosticator-mac.sh
  </code></pre>
  <p>as it will be found on the <code>$PATH</code> after installation.</p>
  <p>From <a href="https://github.com/cccnrc/diagnosticator-mac/blob/main/diagnosticator-mac.sh" rel="nofollow noreferrer">diagnosticator-mac.sh</a> I have to refer to files in the <a href="https://github.com/cccnrc/diagnosticator-mac/tree/main/files" rel="nofollow noreferrer">files</a> folder that are installed through <code>bin.install Dir[&quot;files&quot;]</code>, I have now:</p>
  <pre class="lang-sh prettyprint-override"><code>DIAGNOSTICATOR_FILES_DIR=/usr/local/opt/diagnosticator/bin/files
  </code></pre>
  <p>but I noticed that in a couple of different Mac machines they ended up in different locations based on how users installed <a href="https://brew.sh/" rel="nofollow noreferrer">homebrew</a>.</p>
  <p>How can I find a way to point the <a href="https://github.com/cccnrc/diagnosticator-mac/blob/main/diagnosticator-mac.sh" rel="nofollow noreferrer">diagnosticator-mac.sh</a> executable to that <a href="https://github.com/cccnrc/diagnosticator-mac/tree/main/files" rel="nofollow noreferrer">files</a> folder however <a href="https://brew.sh/" rel="nofollow noreferrer">homebrew</a> was installed?</p>
  <hr />
  <p>If you want to try it:</p>
  <pre class="lang-sh prettyprint-override"><code>brew install cccnrc/diagnosticator/diagnosticator
  </code></pre>