mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refacotr: Use HTTPS to fetch Composer (#8309)
* use https for composer * Fixe alternate --version output for composer
This commit is contained in:
committed by
Neil Lathwood
parent
68d42b065e
commit
9459eeb55f
@@ -39,13 +39,13 @@ class Dependencies extends BaseValidation
|
||||
public function validate(Validator $validator)
|
||||
{
|
||||
$composer_output = trim(shell_exec($validator->getBaseDir() . '/scripts/composer_wrapper.php --version'));
|
||||
$found = preg_match('/Composer version ([.0-9]+)/', $composer_output, $matches);
|
||||
$found = preg_match('/Composer (version )?([.0-9]+)/', $composer_output, $matches);
|
||||
|
||||
if (!$found) {
|
||||
$validator->fail("No composer available, please install composer", "https://getcomposer.org/");
|
||||
return;
|
||||
} else {
|
||||
$validator->ok("Composer Version: " . $matches[1]);
|
||||
$validator->ok("Composer Version: " . $matches[2]);
|
||||
}
|
||||
|
||||
$dep_check = shell_exec($validator->getBaseDir() . '/scripts/composer_wrapper.php install --no-dev --dry-run');
|
||||
|
Reference in New Issue
Block a user