Skip to content

Commit 9708028

Browse files
committed
Fixed the composer require command : escape shell arg
1 parent e1084b7 commit 9708028

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PHP/ComposerRequire.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ public function __toString(): string
2020
return (string) new Dockerfile\Run(sprintf(<<<'RUN'
2121
set -ex \
2222
&& composer require --prefer-dist --no-progress --prefer-stable --sort-packages --optimize-autoloader --with-dependencies %s
23-
RUN, implode(' ', $this->packages)));
23+
RUN, implode(' ', array_map(fn (string $package) => escapeshellarg($package), $this->packages))));
2424
}
2525
}

0 commit comments

Comments
 (0)