1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 00:47:36 +00:00

Everywhere: Use ArgsParser::parse() with Main::Arguments directly

Use the updated API everywhere we are currently manually passing in
`arguments.argc` and `arguments.argv`.
This commit is contained in:
Mustafa Quraish 2021-11-22 19:03:05 -05:00 committed by Brian Gianforcaro
parent 7720644ae2
commit 2fbcab46bf
8 changed files with 8 additions and 8 deletions

View file

@ -36,7 +36,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
args_parser.add_option(flag_print_gid_all, "Print all GIDs", nullptr, 'G');
args_parser.add_option(flag_print_name, "Print name", nullptr, 'n');
args_parser.add_positional_argument(user_str, "User name/UID to query", "USER", Core::ArgsParser::Required::No);
args_parser.parse(arguments.argc, arguments.argv);
args_parser.parse(arguments);
if (flag_print_name && !(flag_print_uid || flag_print_gid || flag_print_gid_all)) {
warnln("cannot print only names or real IDs in default format");