在Windows命令行上运行以下命令时,出现问题:
set P4USER=ARPIT & set P4PORT=opl:p4dia:1934 & set P4CLIENT=opl_reg_591 & p4 client -o
错误:
Perforce client error:
Connect to server failed; check $P4PORT.
The specified class was not found.
但是当在cmd上一个接一个地运行这些命令时,没有问题:
set P4USER=ARPIT
set P4PORT=opl:p4dia:1934
set P4CLIENT=opl_reg_591
p4 client -o
为什么呢?
我想在一行中运行这4个迷你命令,因为我必须在脚本中的反勾中使用它们。如何解决这个问题?
1条答案
按热度按时间2q5ifsrm1#
@Magoo回答(
set "P4USER=ARPIT" for each of the variables being set. Your current syntax includes the space before the & into the value assigned. Quoting as shown makes the assignment required
)是对的。此外,在此上下文中可以使用以下内容: