Skip to content

Commit 57db2a8

Browse files
Escape the path arguments
1 parent c6ac1b4 commit 57db2a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ComposerPlugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ private function runCaptainCommand(string $command): void
172172
$interaction = $this->io->isInteractive() ? '' : ' --no-interaction';
173173

174174
// captainhook config and repository settings
175-
$configuration = ' -c ' . $this->configuration;
176-
$repository = $command === self::COMMAND_INSTALL ? ' -g ' . $this->gitDirectory : '';
175+
$configuration = ' -c ' . escapeshellarg($this->configuration);
176+
$repository = $command === self::COMMAND_INSTALL ? ' -g ' . escapeshellarg($this->gitDirectory) : '';
177177
$skip = $command === self::COMMAND_INSTALL ? ' -s' : '';
178178

179179
// sub process settings

0 commit comments

Comments
 (0)