diff --git a/src/Composer.php b/src/Composer.php index b477c36..ff5c0dd 100644 --- a/src/Composer.php +++ b/src/Composer.php @@ -6,9 +6,20 @@ class Composer extends \Illuminate\Support\Composer { public function installDryRun(string $options = null) { - $process = $this->getProcess(); + $composer = $this->findComposer(); - $process->setCommandLine(trim($this->findComposer().' install --dry-run '.$options)); + $command = array_merge( + (array) $composer, + ['install', '--dry-run'], + array_filter(array_map('trim', explode(' ', $options))) + ); + + if (is_array($composer)) { + $process = $this->getProcess($command); + } else { + $process = $this->getProcess(); + $process->setCommandLine(trim(implode(' ', $command))); + } $process->run();