diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-12-15 12:40:24 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-12-15 12:40:24 +0100 |
commit | f3b9eb9628d50f49522a8eec6f704b2a85bcb59f (patch) | |
tree | 2e5ba4477ffba0493806a00c61853d586fb836a3 /src/commands/build.rs | |
parent | d8f71a5f2f0bd2c5f3433c11249c5e694c2bb73c (diff) |
Fix: Only print phase name if error came from script
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/commands/build.rs')
-rw-r--r-- | src/commands/build.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/commands/build.rs b/src/commands/build.rs index 686ae41..7e832b5 100644 --- a/src/commands/build.rs +++ b/src/commands/build.rs @@ -354,10 +354,14 @@ pub async fn build(repo_root: &Path, .collect::<Result<()>>()?; writeln!(outlock, "\n\n")?; - if let Some(last_phase) = last_phase { - writeln!(outlock, "\tJob errored in Phase '{}'", last_phase)?; + if error_catched { + if let Some(last_phase) = last_phase { + writeln!(outlock, "\tJob errored in Phase '{}'", last_phase)?; + } + writeln!(outlock, "\n\n")?; + } else { + writeln!(outlock, "{}", "Error seems not to be caused by packaging script.".red())?; } - writeln!(outlock, "\n\n")?; } if had_error { |