Fix --no-fork parameter

This commit is contained in:
Patrick Nicolas
2024-10-05 15:33:39 +02:00
parent 6608b1d833
commit 554c0f7ad6
+3 -1
View File
@@ -690,7 +690,7 @@ int main(int argc, char * argv[])
std::string config_file;
app.add_option("-f", config_file, "configuration file")->option_text("FILE")->check(CLI::ExistingFile);
auto no_instructions = app.add_flag("--no-instructions")->group("");
do_fork = not app.add_flag("--no-fork")->description("disable fork to serve connection")->group("Debug");
auto no_fork = app.add_flag("--no-fork")->description("disable fork to serve connection")->group("Debug");
#if WIVRN_USE_SYSTEMD
// --application should only be used from wivrn-application unit file
auto app_flag = app.add_flag("--application")->group("");
@@ -699,6 +699,8 @@ int main(int argc, char * argv[])
CLI11_PARSE(app, argc, argv);
do_fork = not *no_fork;
if (not config_file.empty())
configuration::set_config_file(config_file);