Compare commits

..

2 Commits

Author SHA1 Message Date
Thomas Schönauer
1051e4cf47 AM fix + version bump (#335) 2023-01-29 21:53:26 +00:00
Thomas Schönauer
80a95cb404 Clippy (#331) 2023-01-29 19:31:37 +00:00
5 changed files with 6 additions and 5 deletions

2
Cargo.lock generated
View File

@@ -2049,7 +2049,7 @@ dependencies = [
[[package]] [[package]]
name = "topgrade" name = "topgrade"
version = "10.2.5" version = "10.3.0"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"chrono", "chrono",

View File

@@ -6,7 +6,7 @@ keywords = ["upgrade", "update"]
license = "GPL-3.0" license = "GPL-3.0"
# license-file = "LICENSE" # license-file = "LICENSE"
repository = "https://github.com/topgrade-rs/topgrade" repository = "https://github.com/topgrade-rs/topgrade"
version = "10.2.5" version = "10.3.0"
authors = ["Roey Darwish Dror <roey.ghost@gmail.com>", "Thomas Schönauer <t.schoenauer@hgs-wt.at>"] authors = ["Roey Darwish Dror <roey.ghost@gmail.com>", "Thomas Schönauer <t.schoenauer@hgs-wt.at>"]
exclude = ["doc/screenshot.gif"] exclude = ["doc/screenshot.gif"]
edition = "2021" edition = "2021"

View File

@@ -123,7 +123,7 @@ For more information about this issue see https://askubuntu.com/questions/110969
return result; return result;
} }
} }
print_warning(format!("Self update error: {}", e)); print_warning(format!("Self update error: {e}"));
} }
} }
} }

View File

@@ -31,7 +31,7 @@ pub fn self_update() -> Result<()> {
if let UpdateStatus::Updated(release) = &result { if let UpdateStatus::Updated(release) = &result {
println!("\nTopgrade upgraded to {}:\n", release.version); println!("\nTopgrade upgraded to {}:\n", release.version);
if let Some(body) = &release.body { if let Some(body) = &release.body {
println!("{}", body); println!("{body}");
} }
} else { } else {
println!("Topgrade is up-to-date"); println!("Topgrade is up-to-date");

View File

@@ -436,8 +436,9 @@ fn upgrade_solus(ctx: &ExecutionContext) -> Result<()> {
} }
pub fn update_am(ctx: &ExecutionContext) -> Result<()> { pub fn update_am(ctx: &ExecutionContext) -> Result<()> {
let am = require("am")?;
if let Some(sudo) = ctx.sudo() { if let Some(sudo) = ctx.sudo() {
ctx.run_type().execute(sudo).args(["am", "-u"]).status_checked()?; ctx.run_type().execute(sudo).arg(am).arg("-u").status_checked()?;
} else { } else {
print_warning("No sudo detected. Skipping AM Step"); print_warning("No sudo detected. Skipping AM Step");
} }