Skip to content

Commit

Permalink
Escape spaces in binary path
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianfeldmann committed Mar 4, 2020
1 parent 57db2a8 commit 097b03f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ComposerPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,10 @@ private function runCaptainCommand(string $command): void
$configuration = ' -c ' . escapeshellarg($this->configuration);
$repository = $command === self::COMMAND_INSTALL ? ' -g ' . escapeshellarg($this->gitDirectory) : '';
$skip = $command === self::COMMAND_INSTALL ? ' -s' : '';
$executable = str_replace(' ', '\\ ', $this->executable);

// sub process settings
$cmd = $this->executable . ' ' . $command . $ansi . $interaction . $skip . $configuration . $repository;
// sub process settings
$cmd = $executable . ' ' . $command . $ansi . $interaction . $skip . $configuration . $repository;
$pipes = [];
$spec = [
0 => ['file', 'php://stdin', 'r'],
Expand Down

0 comments on commit 097b03f

Please sign in to comment.