mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
Fix custom pkg download callable not working bug
This commit is contained in:
parent
f47c3a2d20
commit
a375ab9780
@ -368,6 +368,11 @@ class Downloader
|
||||
break;
|
||||
case 'custom': // Custom download method, like API-based download or other
|
||||
$classes = FileSystem::getClassesPsr4(ROOT_DIR . '/src/SPC/store/pkg', 'SPC\store\pkg');
|
||||
if (isset($pkg['func']) && is_callable($pkg['func'])) {
|
||||
$pkg['name'] = $name;
|
||||
$pkg['func']($force, $pkg, SPC_DOWNLOAD_PACKAGE);
|
||||
break;
|
||||
}
|
||||
foreach ($classes as $class) {
|
||||
if (is_a($class, CustomPackage::class, true) && $class !== CustomPackage::class) {
|
||||
$cls = new $class();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user