Skip to content

Commit

Permalink
start of actually using composer 2.2 where available (#323)
Browse files Browse the repository at this point in the history
* start of actually using composer 2.2 where available

* Update CosyComposer.php

* Update CosyComposer.php

* Use uppercased env var for it
  • Loading branch information
eiriksm committed Mar 16, 2024
1 parent 82b6d2d commit 3c13316
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/CosyComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,11 @@ public function run()
if (!empty($_SERVER['queue_runner_revision'])) {
$this->log(sprintf('Queue runner revision %s', $_SERVER['queue_runner_revision']));
}
// Support an alternate composer version based on env var.
if (!empty($_ENV['ALTERNATE_COMPOSER_PATH'])) {
$this->log('Trying to use composer from ' . $_ENV['ALTERNATE_COMPOSER_PATH']);
copy($_ENV['ALTERNATE_COMPOSER_PATH'], __DIR__ . '/../../../../vendor/bin/composer');
}
// Try to get the php version as well.
$this->execCommand(['php', '--version']);
$this->log($this->getLastStdOut());
Expand Down

0 comments on commit 3c13316

Please sign in to comment.