fix user command dir path

This commit is contained in:
sunxyw
2022-12-21 01:19:45 +08:00
parent 3f2bd69002
commit 9bf95223a1

View File

@@ -35,10 +35,10 @@ final class ConsoleApplication extends Application
FileSystem::getClassesPsr4(FRAMEWORK_ROOT_DIR . '/src/ZM/Command', 'ZM\\Command') FileSystem::getClassesPsr4(FRAMEWORK_ROOT_DIR . '/src/ZM/Command', 'ZM\\Command')
); );
// 再加载用户自定义命令(如存在) // 再加载用户自定义命令(如存在)
if (is_dir(zm_dir('src/Command'))) { if (is_dir(SOURCE_ROOT_DIR . '/src/Command')) {
$command_classes = array_merge( $command_classes = array_merge(
$command_classes, $command_classes,
FileSystem::getClassesPsr4(zm_dir('src/Command'), 'Command') FileSystem::getClassesPsr4(SOURCE_ROOT_DIR . '/src/Command', 'Command')
); );
} }
$commands = []; $commands = [];