1
0
Fork 0

Fix perforce arg not being escaped correctly

pull/12001/head
Jordi Boggiano 2024-05-29 15:03:59 +02:00
parent 3c37a67c0c
commit 3773f77527
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 2 additions and 2 deletions

View File

@ -342,7 +342,7 @@ class Perforce
public function connectClient(): void public function connectClient(): void
{ {
$p4CreateClientCommand = $this->generateP4Command( $p4CreateClientCommand = $this->generateP4Command(
'client -i < ' . str_replace(" ", "\\ ", $this->getP4ClientSpec()) 'client -i < ' . ProcessExecutor::escape($this->getP4ClientSpec())
); );
$this->executeCommand($p4CreateClientCommand); $this->executeCommand($p4CreateClientCommand);
} }

View File

@ -328,7 +328,7 @@ class PerforceTest extends TestCase
public function testConnectClient(): void public function testConnectClient(): void
{ {
$this->processExecutor->expects( $this->processExecutor->expects(
['p4 -u user -c composer_perforce_TEST_depot -p port client -i < path/composer_perforce_TEST_depot.p4.spec'], ['p4 -u user -c composer_perforce_TEST_depot -p port client -i < '.ProcessExecutor::escape('path/composer_perforce_TEST_depot.p4.spec')],
true true
); );