Implement per-distro installation flow
This commit is contained in:
parent
caf870d05e
commit
b9b60e9b6c
21 changed files with 1109 additions and 33 deletions
|
|
@ -19,16 +19,35 @@ pub fn render_dispatch_result(result: &DispatchResult) -> String {
|
|||
}
|
||||
}
|
||||
|
||||
fn render_added_app(added: &crate::AddedApp) -> String {
|
||||
format!(
|
||||
"tracked app: {} ({})\nsource: {} {}\nselected artifact: {} [{}]",
|
||||
fn render_added_app(added: &aim_core::app::add::InstalledApp) -> String {
|
||||
let scope = match added.install_scope {
|
||||
aim_core::domain::app::InstallScope::User => "user",
|
||||
aim_core::domain::app::InstallScope::System => "system",
|
||||
};
|
||||
|
||||
let warning_lines = added
|
||||
.warnings
|
||||
.iter()
|
||||
.chain(added.install_outcome.warnings.iter())
|
||||
.map(|warning| format!("warning: {warning}"))
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n");
|
||||
|
||||
let summary = format!(
|
||||
"installing as {scope}\ninstalled app: {} ({})\nsource: {} {}\nselected artifact: {} [{}]",
|
||||
added.record.display_name,
|
||||
added.record.stable_id,
|
||||
added.source.kind.as_str(),
|
||||
added.source.locator,
|
||||
added.selected_artifact.url,
|
||||
added.selected_artifact.selection_reason,
|
||||
)
|
||||
);
|
||||
|
||||
if warning_lines.is_empty() {
|
||||
summary
|
||||
} else {
|
||||
format!("{summary}\n{warning_lines}")
|
||||
}
|
||||
}
|
||||
|
||||
fn render_pending_add(plan: &AddPlan) -> String {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue