1
0
mirror of https://github.com/systemd/systemd synced 2025-10-06 00:13:24 +02:00

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.
This commit is contained in:
David Tardon
2025-10-02 15:57:10 +02:00
parent 292928e964
commit a5fada5d5d

View File

@@ -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;