Skip to content

Commit

Permalink
Process command arguments should be inserted as array. (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurlorenz authored Apr 5, 2023
1 parent b8ea91c commit 1220b19
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/GlobalConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,12 @@ public function applyGlobalComposerConfig() {
$commands[] = 'composer config --global ' . escapeshellcmd($config);
}
if ($commands) {
$process = new Process($commands);
$process->run();
if ($process->getExitCode()) {
throw new InvalidArgumentException("Problems settings global composer config with commands: " . $command);
foreach ($commands as $command) {
$process = new Process(explode(' ', $command));
$process->run();
if ($process->getExitCode()) {
throw new InvalidArgumentException("Problems settings global composer config with commands: " . $command);
}
}
}
}
Expand Down

0 comments on commit 1220b19

Please sign in to comment.