Skip to content

Commit 67641e5

Browse files
authored
chore: not print command when build failed (#13)
1 parent 3768cae commit 67641e5

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

src/progress.rs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,18 @@ impl FancyState {
304304
"interrupted:".red(),
305305
build_message(build, true)
306306
)),
307-
Termination::Failure => self.log_when_failed(&format!(
308-
"{} {}",
309-
"failed:".red().bold(),
310-
build_message(build, true)
311-
)),
307+
Termination::Failure => {
308+
// Show failed message, with command line if in verbose mode.
309+
if self.verbose {
310+
self.log_when_failed(&format!(
311+
"{} {}",
312+
"failed:".red().bold(),
313+
build_message(build, true)
314+
))
315+
} else {
316+
self.log_when_failed(&format!("{}", "failed".red().bold()))
317+
}
318+
}
312319
};
313320
if !result.output.is_empty() {
314321
if let Some(ref callback) = self.callback {

0 commit comments

Comments
 (0)