Fix --no-fork parameter
This commit is contained in:
+3
-1
@@ -690,7 +690,7 @@ int main(int argc, char * argv[])
|
|||||||
std::string config_file;
|
std::string config_file;
|
||||||
app.add_option("-f", config_file, "configuration file")->option_text("FILE")->check(CLI::ExistingFile);
|
app.add_option("-f", config_file, "configuration file")->option_text("FILE")->check(CLI::ExistingFile);
|
||||||
auto no_instructions = app.add_flag("--no-instructions")->group("");
|
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
|
#if WIVRN_USE_SYSTEMD
|
||||||
// --application should only be used from wivrn-application unit file
|
// --application should only be used from wivrn-application unit file
|
||||||
auto app_flag = app.add_flag("--application")->group("");
|
auto app_flag = app.add_flag("--application")->group("");
|
||||||
@@ -699,6 +699,8 @@ int main(int argc, char * argv[])
|
|||||||
|
|
||||||
CLI11_PARSE(app, argc, argv);
|
CLI11_PARSE(app, argc, argv);
|
||||||
|
|
||||||
|
do_fork = not *no_fork;
|
||||||
|
|
||||||
if (not config_file.empty())
|
if (not config_file.empty())
|
||||||
configuration::set_config_file(config_file);
|
configuration::set_config_file(config_file);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user