Merge pull request #34 from MrSmoer/fixhelp

Frontend: Fix help text
This commit is contained in:
Tony Wasserka 2025-01-11 05:39:10 -05:00 committed by GitHub
commit da86d20b97
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -138,7 +138,10 @@ int main(int argc, char* argv[]) {
bpo::variables_map vm;
try {
bpo::store(bpo::command_line_parser(argc, argv).options(desc).positional(p).run(), vm);
if (vm.count("help")) {
std::cout << desc << std::endl;
return 0;
}
if (!vm.count("input") && !vm["launch_menu"].as<bool>())
throw bpo::required_option("input or launch_menu"); // TODO: Better string?
@ -160,10 +163,7 @@ int main(int argc, char* argv[]) {
return 1;
}
if (vm.count("help")) {
std::cout << desc << std::endl;
return 0;
}
// Prefer XDG_DATA_DIRS, then /usr/local/share, then /usr/share
auto xdg_data_dirs = getenv("XDG_DATA_DIRS");