From 62ddd7613c8337bb5b7b77a4724abd4e0b0af1d1 Mon Sep 17 00:00:00 2001 From: Kenneth Myhra Date: Sat, 27 Nov 2021 21:02:54 +0100 Subject: config: Port to LibMain :^) --- Userland/Utilities/CMakeLists.txt | 2 +- Userland/Utilities/config.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'Userland/Utilities') diff --git a/Userland/Utilities/CMakeLists.txt b/Userland/Utilities/CMakeLists.txt index 48aa357009..6c38e6d9af 100644 --- a/Userland/Utilities/CMakeLists.txt +++ b/Userland/Utilities/CMakeLists.txt @@ -70,7 +70,7 @@ target_link_libraries(chres LibGUI LibMain) target_link_libraries(cksum LibCrypto LibMain) target_link_libraries(clear LibMain) target_link_libraries(comm LibMain) -target_link_libraries(config LibConfig) +target_link_libraries(config LibConfig LibMain) target_link_libraries(copy LibGUI LibMain) target_link_libraries(cp LibMain) target_link_libraries(cpp-lexer LibMain) diff --git a/Userland/Utilities/config.cpp b/Userland/Utilities/config.cpp index 881c6e9035..128af34b64 100644 --- a/Userland/Utilities/config.cpp +++ b/Userland/Utilities/config.cpp @@ -7,8 +7,9 @@ #include #include #include +#include -int main(int argc, char** argv) +ErrorOr serenity_main(Main::Arguments arguments) { Core::EventLoop loop; String domain; @@ -24,7 +25,7 @@ int main(int argc, char** argv) args_parser.add_positional_argument(group, "Group name", "group"); args_parser.add_positional_argument(key, "Key name", "key"); args_parser.add_positional_argument(value_to_write, "Value to write", "value", Core::ArgsParser::Required::No); - args_parser.parse(argc, argv); + args_parser.parse(arguments); if (remove_key) { Config::remove_key(domain, group, key); -- cgit v1.2.3