Show pacsave/pacnew files in summary (fix #70)

This commit is contained in:
Roey Darwish Dror
2018-10-02 11:36:10 +03:00
parent 15cec667b0
commit 3875f973d1
4 changed files with 58 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ extern crate log;
extern crate env_logger;
extern crate term_size;
extern crate termcolor;
extern crate walkdir;
#[cfg(target_os = "linux")]
mod linux;
@@ -114,7 +115,7 @@ fn run() -> Result<(), Error> {
#[cfg(target_os = "linux")]
{
if !opt.no_system {
match distribution {
match &distribution {
Ok(distribution) => {
report.push_result(execute(
|terminal| distribution.upgrade(&sudo, terminal, opt.dry_run),
@@ -302,6 +303,13 @@ fn run() -> Result<(), Error> {
for (key, succeeded) in report.data() {
terminal.print_result(key, *succeeded);
}
#[cfg(target_os = "linux")]
{
if let Ok(distribution) = &distribution {
distribution.show_summary();
}
}
}
if report.data().iter().all(|(_, succeeded)| *succeeded) {