journal: reset previously set JSON flags
Make sure we reset the JSON format flags if the format option is used
multiple times, e.g. `journalctl -o json-format -o export`.
Pointed out in: https://github.com/systemd/systemd/pull/22721#discussion_r826018985
Follow-up for: 5a1355d848
This commit is contained in:
@@ -581,6 +581,9 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
|
||||
if (OUTPUT_MODE_IS_JSON(arg_output))
|
||||
arg_json_format_flags = output_mode_to_json_format_flags(arg_output) | JSON_FORMAT_COLOR_AUTO;
|
||||
else
|
||||
arg_json_format_flags = JSON_FORMAT_OFF;
|
||||
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
|
||||
Reference in New Issue
Block a user