diff --git a/Cargo.toml b/Cargo.toml index cef60363b..3321ea559 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT/Apache-2.0" name = "tokei" readme = "README.md" repository = "https://github.com/Aaronepower/tokei.git" -version = "5.0.3" +version = "5.0.4" [profile.release] panic="abort" diff --git a/src/main.rs b/src/main.rs index ad2b96c7f..5c2cd94e7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -105,6 +105,7 @@ fn main() { if let Some(format) = output_option { match_output(format, languages); + return } else if let Some(sort_category) = sort_option { for (_, ref mut language) in &mut languages { @@ -145,23 +146,21 @@ fn main() { } } - if output_option == None { - if !files_option { - println!("{}", ROW); - } - let mut total = Language::new_blank(); - for (_, language) in languages { - total += language; - } - println!(" {: <18} {: >6} {:>12} {:>12} {:>12} {:>12}", - "Total", - total.stats.len(), - total.lines, - total.code, - total.comments, - total.blanks); + if !files_option { println!("{}", ROW); } + let mut total = Language::new_blank(); + for (_, language) in languages { + total += language; + } + println!(" {: <18} {: >6} {:>12} {:>12} {:>12} {:>12}", + "Total", + total.stats.len(), + total.lines, + total.code, + total.comments, + total.blanks); + println!("{}", ROW); } fn isnt_empty(&(_, language): &(&LanguageType, &Language)) -> bool {