Skip to content

Commit

Permalink
Merge aa4a7e2 into 4528ea8
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm committed Jan 15, 2019
2 parents 4528ea8 + aa4a7e2 commit b1b989c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/CosyComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,18 @@ public function run()
} catch (NotUpdatedException $e) {
// Not updated because of the composer command, not the
// restriction itself.
$command = sprintf('composer why-not %s:%s', $item->name, $item->latest);
$this->execCommand(sprintf('COMPOSER_ALLOW_SUPERUSER=1 %s', $command), false);
$this->log($this->getLastStdErr(), Message::COMMAND, [
'command' => $command,
'package' => $item->name,
'type' => 'stderr',
]);
$this->log($this->getLastStdOut(), Message::COMMAND, [
'command' => $command,
'package' => $item->name,
'type' => 'stdout',
]);
$this->log("$package_name was not updated running composer update", Message::NOT_UPDATED, [
'package' => $package_name,
]);
Expand Down
2 changes: 1 addition & 1 deletion test/integration/UpdatesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ function ($cmd) use (&$called, &$composer_update_called) {
file_put_contents("$dir/composer.lock", $composer_lock_contents);
$c->run();
$output = $c->getOutput();
$this->assertEquals('psr/log was not updated running composer update', $output[14]->getMessage());
$this->assertEquals('psr/log was not updated running composer update', $output[16]->getMessage());
$this->assertEquals(true, $called);
}

Expand Down

0 comments on commit b1b989c

Please sign in to comment.