From 434433a66ab3a4f14755864ed20a266429da01c4 Mon Sep 17 00:00:00 2001 From: houchengqiu Date: Thu, 2 Nov 2023 11:53:06 +0800 Subject: [PATCH] fix: cli export -t&-d option cannot use together cli export -t&-d option cannot use together, except for '-t app' Log: cli export -t&-d option cannot use together Bug: https://pms.uniontech.com/bug-view-226569.html --- application/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/main.cpp b/application/main.cpp index 00875ee8..e2701f82 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -145,6 +145,11 @@ int main(int argc, char *argv[]) } } + if (!type.isEmpty() && type != "app" && !appName.isEmpty()) { + qCWarning(logAppMain) << QString("Option -d -t both exist, -t can only be set to 'app' type."); + return -1; + } + if (!type.isEmpty()) { // 按类型导出日志 if (period.isEmpty() &&