Reputation: 177
I'm trying to use p4 commands in my batch files on Mac like p4 login etc. I keep getting the error "-bash p4: command not found".
I followed the top 7 steps here and got the same error: http://www.endlesslycurious.com/2008/11/11/configuring-p4-command-line-client-on-mac-os-x/
I couldn't find anything else useful when searching. Has anyone else encountered a similar issue and resolved it?
Upvotes: 8
Views: 26400
Reputation: 11590
To add to the existing answers, on my macOS Mojave, downloading Perforce 2019.1/1796703 for OSX 10.10+ using Safari gives me a p4.dms
file.
You must rename it to p4
first before using it. Any attempt to unarchive the .dms
file will fail. It is not a valid DMS archive.
Upvotes: 0
Reputation: 111
How-To steps:
(1) Download p4 file for macOS from:
https://www.perforce.com/downloads/helix-command-line-client-p4
(2) Copy the item to any local folder under any custom folder. For ex: '/Users//perforce'
(3) Run the following commands in terminal.
chmod +x /Users/<yourname>/perforce/p4
export PATH=/Users/<yourname>/perforce:$PATH
(4) Now run 'p4' in terminal.
This should not fail!
Upvotes: 7
Reputation: 2030
Just drop the "p4" executable in /usr/local/bin or even /usr/bin if you prefer. ;-)
Upvotes: 8