'Getting `No such file or directory` when executing any terminal command (caused by VMware Fusion)
I am using macOS High Sierra and I am getting the following error when trying to install a script:
sh: Fusion.app/Contents/Public:/Users/<name>/.rvm/bin: No such file or directory
Apparently has something to do either with rvm or Fusion.app, which I don't have that app, what I have is VMWare Fusion.app.
Solution 1:[1]
With VMware Fusion rewriting /etc/paths.d/com.vmware.fusion.public on launch;
Adding this PATH find and replace line to my .bash_profile seems to be working:
export PATH=${PATH//VMware\ F/VMware\\ F}
Solution 2:[2]
This happens because some shell script (in this case perhaps rvm) is not following best practices, specifically:
Double quote to prevent globbing and word splitting https://github.com/koalaman/shellcheck/wiki/SC2086
Changing /etc/paths.d/com.vmware.fusion.public as suggested in other answers could break all other places where this variable is wrapped in double quotes.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | HandstandMick |
| Solution 2 | A B |
