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?
You can verify it is running by going to Control Panel > System and Security > Administrative Tools > Services, and scroll down to Perforce.
Quick start with p4Open p4v (visual Perforce client). Right click on the project folder. Click "Open Terminal". Now you can use p4 in a preconfigured console, you don't need to setup workspace and server connection.
To verify a connection, run the p4 info command. The Server address: field shows the host to which p4 connected and also displays the host and port number on which the Helix Server is listening.
Just drop the "p4" executable in /usr/local/bin or even /usr/bin if you prefer. ;-)
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With