Skip to content

Commit

Permalink
system-upgrade: fix journalctl exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-goode committed Feb 2, 2024
1 parent 857c9d9 commit 1dd933d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dnf5-plugins/system_upgrade_plugin/system_upgrade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ int call(const std::string & command, const std::vector<std::string> & args) {
if (WIFEXITED(status)) {
return WEXITSTATUS(status);
}
if (WIFSIGNALED(status)) {
return 128 + WTERMSIG(status);
}
return -1;
}
}
Expand Down Expand Up @@ -632,7 +635,7 @@ void show_log(size_t boot_index) {
const auto & boot_id = boot_entries[boot_index].boot_id;
const auto rc = call(PATH_TO_JOURNALCTL, {"--boot", boot_id});

if (rc != 0) {
if (rc != 0 && rc != 141) {
throw libdnf5::cli::CommandExitError(1, M_("Unable to match systemd journal entry."));
}
}
Expand Down

0 comments on commit 1dd933d

Please sign in to comment.