I have installed VMware ovftool using the regular installer, which installed it in the /Application
folder. I now want this added to the global path, so I added it to /etc/paths
, see following output:
➜ ~ cat /etc/paths
/Applications/VMware\ OVF\ Tool
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
➜ ~ ls /Applications/VMware\ OVF\ Tool
README.txt lib vmware-eula.rtf
certs open_source_licenses.txt vmware.eula
env ovftool
icudt44l.dat schemas
Still the command is not found when trying to execute it, but the path variable is set correctly:
➜ ~ ovftool
zsh: command not found: ovftool
➜ ~ echo $PATH
/Applications/VMware\ OVF\ Tool:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/MacGPG2/bin
How to correctly make ovftool available?
Edit based on the (not working) answer below:
➜ ~ echo $PATH
"/Applications/VMware OVF Tool":/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/MacGPG2/bin
➜ ~ ovftool
zsh: command not found: ovftool
➜ ~ echo $PATH
"/Applications/VMware\ OVF\ Tool":/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/MacGPG2/bin
➜ ~ ovftool
zsh: command not found: ovftool
Edit 2:
Wrapping the entire path in quotes and exporting it again works:
➜ ~ export PATH="/Applications/VMware OVF Tool:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/MacGPG2/bin"
➜ ~ ovftool
Error: No source or target specified. Try 'ovftool --help' for more options.
Completed with errors
How do I do that in /etc/paths
though?