mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
PHP_BINDIR to allow composer.phar to work in more situations
This commit is contained in:
@@ -55,7 +55,7 @@ if (php_sapi_name() == 'cli' && isset($_SERVER['TERM'])) {
|
||||
}
|
||||
|
||||
if (is_file($install_dir . '/composer.phar')) {
|
||||
$exec = 'php ' . $install_dir . '/composer.phar';
|
||||
$exec = PHP_BINDIR . '/php ' . $install_dir . '/composer.phar';
|
||||
|
||||
// self-update
|
||||
passthru("$exec self-update -q" . $extra_args);
|
||||
@@ -77,8 +77,8 @@ if (is_file($install_dir . '/composer.phar')) {
|
||||
echo "Error: Failed to download $installer_url\n";
|
||||
} elseif (@hash_file('SHA384', $dest) === $good_sha) {
|
||||
// Installer verified
|
||||
shell_exec("php $dest");
|
||||
$exec = "php $install_dir/composer.phar";
|
||||
shell_exec(PHP_BINDIR . "/php $dest");
|
||||
$exec = PHP_BINDIR . "/php $install_dir/composer.phar";
|
||||
} else {
|
||||
echo "Error: Corrupted download, signature doesn't match for $installer_url\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user