mirror of
https://github.com/jlengrand/engine.git
synced 2026-03-10 08:11:21 +00:00
Add better error message when build is canceled (#621)
This commit is contained in:
committed by
GitHub
parent
77958d1cb9
commit
c196565d86
@@ -574,10 +574,24 @@ impl BuildPlatform for LocalDocker {
|
||||
)
|
||||
};
|
||||
|
||||
let msg = match &result {
|
||||
Ok(_) => format!("✅ Container {} is built", self.name_with_id()),
|
||||
Err(engine_err) if engine_err.is_cancel() => {
|
||||
format!("⛔ Container {} build has been canceled", self.name_with_id())
|
||||
}
|
||||
Err(engine_err) => {
|
||||
format!(
|
||||
"❌ Container {} failed to be build: {}",
|
||||
self.name_with_id(),
|
||||
engine_err.message.as_ref().map(|x| x.as_str()).unwrap_or_default()
|
||||
)
|
||||
}
|
||||
};
|
||||
|
||||
listeners_helper.deployment_in_progress(ProgressInfo::new(
|
||||
ProgressScope::Application { id: app_id },
|
||||
ProgressLevel::Info,
|
||||
Some(format!("container {} is built ✔", self.name_with_id())),
|
||||
Some(msg),
|
||||
self.context.execution_id(),
|
||||
));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user