mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-22 16:15:34 +08:00
fix workerman select exit fake fatal bug
This commit is contained in:
@@ -79,7 +79,11 @@ class PluginGenerator
|
||||
file_put_contents(zm_dir($plugin_base_dir . '/composer.json'), json_encode($composer_json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
|
||||
// TODO: 寻找 PHP 运行环境和 Composer 是否在当前目录的情况
|
||||
chdir($plugin_base_dir);
|
||||
passthru('composer dump-autoload');
|
||||
$env = getenv('COMPOSER_EXECUTABLE');
|
||||
if ($env === false) {
|
||||
$env = 'composer';
|
||||
}
|
||||
passthru(PHP_BINARY . ' ' . escapeshellcmd($env) . ' dump-autoload');
|
||||
chdir(WORKING_DIR);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user