main: invoke pager_open() only at one place

Let's just move this up a few lines and unify the invocation.
This commit is contained in:
Lennart Poettering 2017-12-15 16:25:28 +01:00
parent b0d7c98993
commit 5625c18a47

View file

@ -2305,7 +2305,7 @@ int main(int argc, char *argv[]) {
if (r < 0)
goto finish;
if (IN_SET(arg_action, ACTION_TEST, ACTION_HELP))
if (IN_SET(arg_action, ACTION_TEST, ACTION_HELP, ACTION_DUMP_CONFIGURATION_ITEMS))
pager_open(arg_no_pager, false);
if (arg_action != ACTION_RUN)
@ -2318,7 +2318,6 @@ int main(int argc, char *argv[]) {
retval = version();
goto finish;
} else if (arg_action == ACTION_DUMP_CONFIGURATION_ITEMS) {
pager_open(arg_no_pager, false);
unit_dump_config_items(stdout);
retval = EXIT_SUCCESS;
goto finish;