Skip to content

Commit 7e4e7fd

Browse files
committed
Fixe the composer require command : escape shell arg
1 parent 0e25080 commit 7e4e7fd

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)