Skip to content

Commit

Permalink
core/command: avoid running when cli11 forces returning 0
Browse files Browse the repository at this point in the history
Fixes running when --help is passed.
  • Loading branch information
outfoxxed committed Jan 3, 2025
1 parent 47bcf8e commit dc3a796
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/launch/command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ int locateConfigFile(CommandState& cmd, QString& path);

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

if (state.misc.checkCompat) {
if (strcmp(qVersion(), QT_VERSION_STR) != 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/launch/parsecommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ int parseCommand(int argc, char** argv, CommandState& state) {

CLI11_PARSE(*cli, argc, argv);

return 0;
return 65535;
}

} // namespace qs::launch

0 comments on commit dc3a796

Please sign in to comment.