Reputation: 41
Recently I work on linux, and try to use vs code as dev IDE, every thing is fine except the p4 plug-in is hard to configure. I set "perforce.command": /home/myname/Downloads/p4v-2015/bin/p4v. but when I try to save an unchecked out file, output window tells me:
ERROR:
Command failed: "/home/frank/Downloads/p4v-2015/bin/p4v" info
"/home/frank/Downloads/p4v-2015/bin/p4v" opened "/home/frank/Perforce/my_Workspace/<path to the file>/<file>.cpp"
"/home/frank/Downloads/p4v-2015/bin/p4v" opened "/root/.config/Code - Insiders/User/settings.json"
"/home/frank/Downloads/p4v-2015/bin/p4v" login -s
can anyone helps me, I have to manually check out files now, it really sucks....
Upvotes: 2
Views: 3530
Reputation: 41
1 download p4 command line executable from https://www.perforce.com/downloads/helix-command-line-client-p4 2 chmod +x p4(download exe) 3 set env like this:
P4PORT="proxy:1666"
P4CLIENT="workspace"
P4PASSWD="0E2XXXXXXXXXXXXXXXXXX"
P4USER="username"
PS: run command "p4 login -s" to generate P4PASSWD key. 5 install p4 vs code extension and modify setting like this:
perforce.editOnFileSave: true,
perforce.addOnFileCreate: true,
perforce.deleteOnFileDelete: true,
perforce.command: <PATH TO p4>\p4
PS: perforce.command has to point to p4 command line exe, NOT p4v. 6 COMPLETE, can auto check out opened file by press "ctrl+s"
Upvotes: 2
Reputation: 89965
As Bryan Pendleton mentioned, make sure that you configure your Visual Studio plug-in to use p4
, not p4v.
p4v
is the graphical (visual) client; p4
is the command-line client. The command-line client is the one that you would use for any kind of scripting/automation.
Upvotes: 1