Open craigsadler opened 2 years ago
Actually, that won't quite do it. We need the '$PATH' to be expanded as late as possible so it needs to be in the rc files as $PATH.
I will do some experimentation over the weekend. but I suspect
echo 'export PATH="'"${HOMEBREW_PREFIX}"'/opt/openssl/bin:$PATH"'
might do the trick, at the same time allowing for a space in either HOMEBREW_PREFIX
or PATH
It appears the quoting might be a different to allow the HOMEBREW_PREFIX variable to properly resolve to its contents in the tee command:
echo 'export PATH="${HOMEBREW_PREFIX}/opt/openssl/bin:$PATH"'
results in shell files getting:
export PATH="${HOMEBREW_PREFIX}/opt/openssl/bin:$PATH"
While,
echo 'export PATH='"${HOMEBREW_PREFIX}/opt/openssl/bin:$PATH"
Does what is intended, i.e. shell files get a good PATH assignment.
export PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin