sergot / openssl

OpenSSL bindings for Perl 6
MIT License
14 stars 31 forks source link

use --installed option while executing brew #84

Closed skaji closed 3 years ago

skaji commented 3 years ago

I created PR #83 (and it was merged, thanks!), where we used brew --prefix openssl to probe openssl libraries. But it turns out that brew --prefix openssl prints a directory even if openssl formula is not installed. I'm sorry.

❯ brew --prefix --help
Usage: brew --prefix [--unbrewed] [--installed] [formula ...]
...
If formula is provided, display the location where formula is or would be
installed.
...
      --installed                  Outputs nothing and returns a failing
                                   status code if formula is not installed.

This PR adds --installed option to brew --prefix command so that brew --prefix prints a directory only if openssl formula is actually installed.