mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-02 14:25:38 +08:00
fix built-in composer not working with init command
This commit is contained in:
@@ -41,6 +41,11 @@ final class ConsoleApplication extends Application
|
||||
FileSystem::getClassesPsr4(SOURCE_ROOT_DIR . '/src/Command', 'Command')
|
||||
);
|
||||
}
|
||||
// 初始化 Composer 变量
|
||||
if (file_exists(WORKING_DIR . '/runtime/composer.phar')) {
|
||||
echo '* Using native composer' . PHP_EOL;
|
||||
putenv('COMPOSER_EXECUTABLE=' . WORKING_DIR . '/runtime/composer.phar');
|
||||
}
|
||||
$commands = [];
|
||||
foreach ($command_classes as $command_class) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user