have to set port every time in command line when trying to trigger any Perforce command

后端 未结 2 2001
一向
一向 2021-01-22 01:27

I\'m new to Perforce, need to work in command line, i\'m so confused why all the commands on the tutorial websites all write like $p4 command, but I have to add the

2条回答
  •  无人共我
    2021-01-22 01:56

    There are a couple ways to make myhost:1666 the default. These are, in the order of decreasing precedence:

    1. command-line options (like -p myhost:1666)
    2. the P4CONFIG file
    3. environment variables (%P4PORT%)
    4. on Windows, the registry (use p4 set P4PORT=myhost:1666 to set it)

    See the docs here.

    In your case, I guess the registry (if on Windows) or the env. var. (if on Linux) is the best option.

提交回复
热议问题