diff --git a/src/config/plugin/webman/console/app.php b/src/config/plugin/webman/console/app.php index 074e986..c1186cb 100644 --- a/src/config/plugin/webman/console/app.php +++ b/src/config/plugin/webman/console/app.php @@ -21,4 +21,7 @@ 'custom_ini' => ' memory_limit = 256M ', + + 'command_dir' => app_path('command'), + 'command_namespace' => 'app\\command' ]; diff --git a/src/webman b/src/webman index 00520d1..9ab1754 100755 --- a/src/webman +++ b/src/webman @@ -21,8 +21,9 @@ if (!in_array($argv[1] ?? '', ['start', 'restart', 'stop', 'status', 'reload', ' $cli = new Command(); $cli->setName('webman cli'); $cli->installInternalCommands(); -if (is_dir($command_path = Util::guessPath(app_path(), '/command', true))) { - $cli->installCommands($command_path); +if (is_dir($command_path = config('plugin.webman.console.app.command_dir'))) { + $command_namespace = config('plugin.webman.console.app.command_namespace'); + $cli->installCommands($command_path, $command_namespace); } foreach (config('plugin', []) as $firm => $projects) {