Skip to content

Commit

Permalink
Add "Complete!" message after succesfull transaction
Browse files Browse the repository at this point in the history
Keeping the last message something abou scriptlets is not clear
message that everything passed correctly and program was terminated
correctly. The commit uses the same message like DNF4. Contrary
to DNF4, this commit does not add Complete! message when there is
anything to perform - no transaction table.

Closes: #613
  • Loading branch information
j-mracek committed Jun 20, 2024
1 parent 01f0c59 commit f3a8bff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dnf5/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,11 @@ int main(int argc, char * argv[]) try {

log_router.info("DNF5 finished");

// Print Complete! message only when transaction is created to prevent poluting output from repoquery or other command
if (auto * transaction = context.get_transaction(); transaction && !transaction->empty()) {
std::cout << "Complete!\n";
}

return static_cast<int>(libdnf5::cli::ExitCode::SUCCESS);
} catch (const libdnf5::Error & e) {
std::cerr << libdnf5::format(e, libdnf5::FormatDetailLevel::WithName);
Expand Down

0 comments on commit f3a8bff

Please sign in to comment.