How can I get the brew installed path in macOS's non-interactive ssh $PATH
variable?
#1307
-
Trying to use
Upon closer inspection I found that
Getting the
If I ssh into the machine, it runs all of the Interestingly,
so somehow the I found a workaround by adding a
and adding this line to
This works, but it doesn't seem ideal; apparently there are security concerns with setting Has anyone else ran into this? Is there something that can be done to get that path working correctly, preferably automatically when something like |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Thanks, this worked for me, but I agree I'd like a better solution without using |
Beta Was this translation helpful? Give feedback.
-
This might help: https://superuser.com/questions/1484960/set-path-when-ssh-into-macos Searching for |
Beta Was this translation helpful? Give feedback.
-
I don't use What
So if you want Homebrew stuff to be available no matter when, I think adding:
to |
Beta Was this translation helpful? Give feedback.
I don't use
mosh
, but I'm quite sure it creates an interactive connection, else it would be pointless. :)What
ssh
does when directly invoking a command on the server is to spawn a interactive non-login shell, so~/.zprofile
will never be sourced. Since you're usingzsh
, the following paragraph from the STARTUP/SHUTDOWN FILES section of thezsh
man page is relevant: