From a5fada5d5da0152143161762a35c7e53b5ff1947 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Thu, 2 Oct 2025 15:57:10 +0200 Subject: [PATCH] userdbctl: require value for --output= Currently, when --output= is used with empty string, it resets the mode. E.g., # userdbctl user --output=json --output= ... will use the default output mode, not JSON. But that functionality is not documented and it seems to be of little practical use. Let's just drop it. --- src/userdb/userdbctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/userdb/userdbctl.c b/src/userdb/userdbctl.c index 9959869e7a..da3901a07e 100644 --- a/src/userdb/userdbctl.c +++ b/src/userdb/userdbctl.c @@ -1652,9 +1652,7 @@ static int parse_argv(int argc, char *argv[]) { break; case ARG_OUTPUT: - if (isempty(optarg)) - arg_output = _OUTPUT_INVALID; - else if (streq(optarg, "classic")) + if (streq(optarg, "classic")) arg_output = OUTPUT_CLASSIC; else if (streq(optarg, "friendly")) arg_output = OUTPUT_FRIENDLY;