修复命令执行缺少执行函数时的处理逻辑

This commit is contained in:
2025-02-24 10:11:22 +08:00
parent 5fe8cc34e6
commit 7ba4810002
2 changed files with 4 additions and 4 deletions

View File

@ -505,9 +505,9 @@ public:
// 执行函数
auto fn = cmd->execute();
if (fn)
return fn(CommandArgument(options, arguments));
return 1;
if (!fn)
printUsage(cmd);
return fn(CommandArgument(options, arguments));
}
private: