From e161d3cd3c1bad7c5f5d9ef954cd22e3aec1a871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sch=C3=B6nauer?= <37108907+DottoDev@users.noreply.github.com> Date: Sun, 6 Nov 2022 13:54:38 +0000 Subject: [PATCH] 10.1.2 (#162) * Closes #150 please disable distrobox by default (#151) * Check if distrobox exists before running step * Improve help prompt value names (#153) * 159 self update error message with standalone versions (#161) * Rename back to topgrade * Bugfix Version bump * Changes reference to topgrade-rs in self-update * Fixes distrobox errors (#160) * Rename back to topgrade * Bugfix Version bump * Check if distrobox exists before running step * Fixed sitrobox and version bump * Version bump to 10.1.2 Co-authored-by: Marcin Puc --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/config.rs | 21 ++++++++++++++------- src/self_update.rs | 6 +----- src/steps/os/linux.rs | 3 ++- 5 files changed, 19 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2c86ccfb..0aa46ae7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1946,7 +1946,7 @@ dependencies = [ [[package]] name = "topgrade" -version = "10.1.0" +version = "10.1.2" dependencies = [ "anyhow", "cfg-if", diff --git a/Cargo.toml b/Cargo.toml index adff3ba6..63c321ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ categories = ["os"] keywords = ["upgrade", "update"] license-file = "LICENSE" repository = "https://github.com/topgrade-rs/topgrade" -version = "10.1.0" +version = "10.1.2" authors = ["Roey Darwish Dror ", "Thomas Schönauer "] exclude = ["doc/screenshot.gif"] edition = "2021" diff --git a/src/config.rs b/src/config.rs index 10727019..f032c2e2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -424,19 +424,19 @@ pub struct CommandLineArgs { no_retry: bool, /// Do not perform upgrades for the given steps - #[clap(long = "disable", arg_enum, multiple_values = true)] + #[clap(long = "disable", value_name = "STEP", arg_enum, multiple_values = true)] disable: Vec, /// Perform only the specified steps (experimental) - #[clap(long = "only", arg_enum, multiple_values = true)] + #[clap(long = "only", value_name = "STEP", arg_enum, multiple_values = true)] only: Vec, /// Run only specific custom commands - #[clap(long = "custom-commands")] + #[clap(long = "custom-commands", value_name = "NAME", multiple_values = true)] custom_commands: Vec, /// Set environment variables - #[clap(long = "env", multiple_values = true)] + #[clap(long = "env", value_name = "NAME=VALUE", multiple_values = true)] env: Vec, /// Output logs @@ -452,7 +452,14 @@ pub struct CommandLineArgs { skip_notify: bool, /// Say yes to package manager's prompt - #[clap(short = 'y', long = "yes", arg_enum, multiple_values = true, min_values = 0)] + #[clap( + short = 'y', + long = "yes", + value_name = "STEP", + arg_enum, + multiple_values = true, + min_values = 0 + )] yes: Option>, /// Don't pull the predefined git repos @@ -460,11 +467,11 @@ pub struct CommandLineArgs { disable_predefined_git_repos: bool, /// Alternative configuration file - #[clap(long = "config")] + #[clap(long = "config", value_name = "PATH")] config: Option, /// A regular expression for restricting remote host execution - #[clap(long = "remote-host-limit")] + #[clap(long = "remote-host-limit", value_name = "REGEX")] remote_host_limit: Option, /// Show the reason for skipped steps diff --git a/src/self_update.rs b/src/self_update.rs index 9f10b2f3..9488fb58 100644 --- a/src/self_update.rs +++ b/src/self_update.rs @@ -18,11 +18,7 @@ pub fn self_update() -> Result<()> { .repo_owner("topgrade-rs") .repo_name("topgrade") .target(target) - .bin_name(if cfg!(windows) { - "topgrade-rs.exe" - } else { - "topgrade-rs" - }) + .bin_name(if cfg!(windows) { "topgrade.exe" } else { "topgrade" }) .show_output(false) .show_download_progress(true) .current_version(self_update_crate::cargo_crate_version!()) diff --git a/src/steps/os/linux.rs b/src/steps/os/linux.rs index fbf6fd5e..20f791dd 100644 --- a/src/steps/os/linux.rs +++ b/src/steps/os/linux.rs @@ -628,7 +628,8 @@ pub fn run_distrobox_update(ctx: &ExecutionContext) -> Result<()> { (r, true) => r.arg("--root"), (r, false) => r, } - .check_run() + .check_run()?; + Ok(()) } pub fn run_config_update(ctx: &ExecutionContext) -> Result<()> {