diff --git a/dnf5/main.cpp b/dnf5/main.cpp index e94872b58..2cb110421 100644 --- a/dnf5/main.cpp +++ b/dnf5/main.cpp @@ -750,7 +750,7 @@ int main(int argc, char * argv[]) try { } std::cerr << ex.what() << _(". Add \"--help\" for more information about the arguments.") << std::endl; if (auto * unknown_arg_ex = dynamic_cast(&ex)) { - if (unknown_arg_ex->get_command() == "dnf5") { + if (unknown_arg_ex->get_command() == "dnf5" && unknown_arg_ex->get_argument()[0] != '-') { std::cout << fmt::format( "It could be a command provided by a plugin, try: dnf install dnf5-command({})", unknown_arg_ex->get_argument())