Brew keg-only: which shell profile to use?

step
#1

When installing some homebrew applications, such as openssl, it gets installed as keg-only, this is without creating a symlink to /usr/local/bin/. I need to use some features of this package for another application.

Normally it’s sufficient to add the PATH export to the shell profile file:

echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.bashrc

But this is not working for the script step, the file is not read, nor ~/.profile or ~/.bash_login files are read. Also, other steps don’t seem to use the PATH location from the profile file, such as the yarn step.

Have thought about creating the symlink manually, but this would overwrite the PATH precedence from the system.

What is the recommended way to handle such situations like updating the PATH to be picked up by other tools?

0 Likes