If certain programs are installed that are not part of the base system, such as what is installed via homebrew, then they will not be found in a non-interactive shell.
Rsync and git will default to the system provided versions in /usr/bin, and programs like mosh-server and git-annex will not work at all.
If certain programs are installed that are not part of the base system, such as what is installed via homebrew, then they will not be found in a non-interactive shell. Rsync and git will default to the system provided versions in /usr/bin, and programs like mosh-server and git-annex will not work at all.
More discussion here: https://github.com/mobile-shell/mosh/issues/102#issuecomment-12503646