fix plugin install not respect php binary

This commit is contained in:
sunxyw 2023-02-11 19:03:13 +08:00
parent f323d75b63
commit 4570012a9d
No known key found for this signature in database
GPG Key ID: F391C42B19AFFC98

View File

@ -98,7 +98,7 @@ class PluginInstallCommand extends PluginCommand
// 使用内建 Composer
if (file_exists(WORKING_DIR . '/runtime/composer.phar')) {
$this->info('使用内建 Composer');
passthru('php ' . escapeshellarg(WORKING_DIR . '/runtime/composer.phar') . ' install --no-dev', $code);
passthru(PHP_BINARY . ' ' . escapeshellarg(WORKING_DIR . '/runtime/composer.phar') . ' install --no-dev', $code);
} else {
$this->info('使用系统 Composer');
passthru('composer install --no-dev', $code);