Skip to content

Commit

Permalink
Don't emit an empty error string.
Browse files Browse the repository at this point in the history
Allow matching the tool repo/alias as well as <author>/<repo>

Use 'stable' as the Rust version.
  • Loading branch information
dsully committed Sep 14, 2023
1 parent 682e5a9 commit 0a0c7fa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.70"
channel = "stable"
components = ["rustfmt", "clippy"]
profile = "minimal"
15 changes: 11 additions & 4 deletions src/actions/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ pub async fn update_tools(
}
progress_bar.inc(1);
}
error!("{}", failed_tools.join("\n"));

if !failed_tools.is_empty() {
error!("{}", failed_tools.join("\n"));
}

Ok(())
}
Expand All @@ -44,11 +47,15 @@ pub async fn update_tools(
} else {
None
};
if let Some(tool) = tools.iter().find(|t| t.name == split_name[0]) {
info!("Tool: {:?}", tool);

if let Some(tool) = tools
.iter()
.find(|t| t.name == split_name[0] || t.alias == split_name[0])
{
info!("Updating: {:?}", tool);

match super::handle_tool_install(env, tool, system, version).await {
Ok(_) => info!("Tool {} has been updated.", &tool.name),
Ok(_) => info!("{} has been updated.", &tool.name),
Err(install_err) => error!("{:?}", install_err),
}
} else {
Expand Down

0 comments on commit 0a0c7fa

Please sign in to comment.