Skip to content

Commit 097b03f

Browse files
Escape spaces in binary path
1 parent 57db2a8 commit 097b03f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ComposerPlugin.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,10 @@ private function runCaptainCommand(string $command): void
175175
$configuration = ' -c ' . escapeshellarg($this->configuration);
176176
$repository = $command === self::COMMAND_INSTALL ? ' -g ' . escapeshellarg($this->gitDirectory) : '';
177177
$skip = $command === self::COMMAND_INSTALL ? ' -s' : '';
178+
$executable = str_replace(' ', '\\ ', $this->executable);
178179

179-
// sub process settings
180-
$cmd = $this->executable . ' ' . $command . $ansi . $interaction . $skip . $configuration . $repository;
180+
// sub process settings
181+
$cmd = $executable . ' ' . $command . $ansi . $interaction . $skip . $configuration . $repository;
181182
$pipes = [];
182183
$spec = [
183184
0 => ['file', 'php://stdin', 'r'],

0 commit comments

Comments
 (0)