Skip to content

Commit dc3a796

Browse files
committed
core/command: avoid running when cli11 forces returning 0
Fixes running when --help is passed.
1 parent 47bcf8e commit dc3a796

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/launch/command.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ int locateConfigFile(CommandState& cmd, QString& path);
4343

4444
int runCommand(int argc, char** argv, QCoreApplication* coreApplication) {
4545
auto state = CommandState();
46-
if (auto ret = parseCommand(argc, argv, state); ret != 0) return ret;
46+
if (auto ret = parseCommand(argc, argv, state); ret != 65535) return ret;
4747

4848
if (state.misc.checkCompat) {
4949
if (strcmp(qVersion(), QT_VERSION_STR) != 0) {

src/launch/parsecommand.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ int parseCommand(int argc, char** argv, CommandState& state) {
192192

193193
CLI11_PARSE(*cli, argc, argv);
194194

195-
return 0;
195+
return 65535;
196196
}
197197

198198
} // namespace qs::launch

0 commit comments

Comments
 (0)