Skip to content

Commit 0d8abe7

Browse files
committed
Process command arguments should be inserted as array.
1 parent 8c4aed0 commit 0d8abe7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/GlobalConfig.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,13 @@ public function applyGlobalComposerConfig() {
159159
$commands[] = 'composer config --global ' . escapeshellcmd($config);
160160
}
161161
if ($commands) {
162-
$process = new Process($commands);
163-
$process->run();
164-
if ($process->getExitCode()) {
165-
throw new InvalidArgumentException("Problems settings global composer config with commands: " . $command);
162+
foreach ($commands as $command) {
163+
$process = new Process(explode(' ', $command));
164+
$process->run();
165+
if ($process->getExitCode()) {
166+
echo $process->getExitCode();
167+
throw new InvalidArgumentException("Problems settings global composer config with commands: " . $command);
168+
}
166169
}
167170
}
168171
}

0 commit comments

Comments
 (0)