forked from quickshell/quickshell
core/command: avoid running when cli11 forces returning 0
Fixes running when --help is passed.
This commit is contained in:
parent
47bcf8ee61
commit
dc3a79600d
2 changed files with 2 additions and 2 deletions
|
@ -43,7 +43,7 @@ int locateConfigFile(CommandState& cmd, QString& path);
|
||||||
|
|
||||||
int runCommand(int argc, char** argv, QCoreApplication* coreApplication) {
|
int runCommand(int argc, char** argv, QCoreApplication* coreApplication) {
|
||||||
auto state = CommandState();
|
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 (state.misc.checkCompat) {
|
||||||
if (strcmp(qVersion(), QT_VERSION_STR) != 0) {
|
if (strcmp(qVersion(), QT_VERSION_STR) != 0) {
|
||||||
|
|
|
@ -192,7 +192,7 @@ int parseCommand(int argc, char** argv, CommandState& state) {
|
||||||
|
|
||||||
CLI11_PARSE(*cli, argc, argv);
|
CLI11_PARSE(*cli, argc, argv);
|
||||||
|
|
||||||
return 0;
|
return 65535;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace qs::launch
|
} // namespace qs::launch
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue