Skip to content

Commit 0d9a06d

Browse files
authored
Merge pull request #76 from fitztrev/patch-3
Update Composer checks to work with Laravel 5.8
2 parents 57d8707 + 14890fd commit 0d9a06d

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/Composer.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,20 @@ class Composer extends \Illuminate\Support\Composer
66
{
77
public function installDryRun(string $options = null)
88
{
9-
$process = $this->getProcess();
9+
$composer = $this->findComposer();
1010

11-
$process->setCommandLine(trim($this->findComposer().' install --dry-run '.$options));
11+
$command = array_merge(
12+
(array) $composer,
13+
['install', '--dry-run'],
14+
array_filter(array_map('trim', explode(' ', $options)))
15+
);
16+
17+
if (is_array($composer)) {
18+
$process = $this->getProcess($command);
19+
} else {
20+
$process = $this->getProcess();
21+
$process->setCommandLine(trim(implode(' ', $command)));
22+
}
1223

1324
$process->run();
1425

0 commit comments

Comments
 (0)