Fix perforce arg not being escaped correctly
parent
406e3f9ede
commit
47374343a1
|
@ -428,7 +428,7 @@ class Perforce
|
||||||
public function connectClient()
|
public function connectClient()
|
||||||
{
|
{
|
||||||
$p4CreateClientCommand = $this->generateP4Command(
|
$p4CreateClientCommand = $this->generateP4Command(
|
||||||
'client -i < ' . str_replace(" ", "\\ ", $this->getP4ClientSpec())
|
'client -i < ' . ProcessExecutor::escape($this->getP4ClientSpec())
|
||||||
);
|
);
|
||||||
$this->executeCommand($p4CreateClientCommand);
|
$this->executeCommand($p4CreateClientCommand);
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,7 +339,7 @@ class PerforceTest extends TestCase
|
||||||
|
|
||||||
public function testConnectClient()
|
public function testConnectClient()
|
||||||
{
|
{
|
||||||
$expectedCommand = 'p4 -u user -c composer_perforce_TEST_depot -p port client -i < path/composer_perforce_TEST_depot.p4.spec';
|
$expectedCommand = 'p4 -u user -c composer_perforce_TEST_depot -p port client -i < '.ProcessExecutor::escape('path/composer_perforce_TEST_depot.p4.spec');
|
||||||
$this->processExecutor->expects($this->at(0))
|
$this->processExecutor->expects($this->at(0))
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->with($this->equalTo($expectedCommand), $this->equalTo(null))
|
->with($this->equalTo($expectedCommand), $this->equalTo(null))
|
||||||
|
|
Loading…
Reference in New Issue