Skip to content

Commit 1063b4c

Browse files
Merge pull request #15 from aboks/escape-executable
Properly escape executable
2 parents 835cb66 + 196382a commit 1063b4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ComposerPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ private function runCaptainCommand(string $command): void
210210
$configuration = ' -c ' . escapeshellarg($this->configuration);
211211
$repository = $command === self::COMMAND_INSTALL ? ' -g ' . escapeshellarg($this->gitDirectory) : '';
212212
$skip = $command === self::COMMAND_INSTALL ? ' -s' : '';
213-
$executable = str_replace(' ', '\\ ', $this->executable);
213+
$executable = escapeshellarg($this->executable);
214214

215215
// sub process settings
216216
$cmd = $executable . ' ' . $command . $ansi . $interaction . $skip . $configuration . $repository;

0 commit comments

Comments
 (0)