mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-22 08:05:34 +08:00
fix plugin:make autoload bug
This commit is contained in:
@@ -50,7 +50,7 @@ class Framework
|
|||||||
public const VERSION_ID = 715;
|
public const VERSION_ID = 715;
|
||||||
|
|
||||||
/** @var string 版本名称 */
|
/** @var string 版本名称 */
|
||||||
public const VERSION = '3.1.9';
|
public const VERSION = '3.1.10';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var RuntimePreferences 运行时偏好(环境信息&参数)
|
* @var RuntimePreferences 运行时偏好(环境信息&参数)
|
||||||
|
|||||||
@@ -83,7 +83,8 @@ class PluginGenerator
|
|||||||
// TODO: 寻找 PHP 运行环境和 Composer 是否在当前目录的情况
|
// TODO: 寻找 PHP 运行环境和 Composer 是否在当前目录的情况
|
||||||
chdir($plugin_base_dir);
|
chdir($plugin_base_dir);
|
||||||
$env = ZMUtil::getComposerExecutable();
|
$env = ZMUtil::getComposerExecutable();
|
||||||
passthru(PHP_BINARY . ' ' . escapeshellcmd($env) . ' dump-autoload');
|
$cmd = $env === 'composer' ? $env . ' dump-autoload' : PHP_BINARY . ' ' . escapeshellcmd($env) . ' dump-autoload';
|
||||||
|
passthru($cmd);
|
||||||
chdir(WORKING_DIR);
|
chdir(WORKING_DIR);
|
||||||
return $plugin_base_dir;
|
return $plugin_base_dir;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user