diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e07fe8..98bf346 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] +### Fixed +- Fix `self-upgrade` overwriting its own binary by @daimond113 + ## [0.5.0-rc.4] - 2024-10-12 ### Added - Add `yes` argument to skip all prompts in publish command by @daimond113 diff --git a/src/cli/commands/self_upgrade.rs b/src/cli/commands/self_upgrade.rs index 922a698..5c66051 100644 --- a/src/cli/commands/self_upgrade.rs +++ b/src/cli/commands/self_upgrade.rs @@ -1,7 +1,4 @@ -use crate::cli::{ - config::read_config, - version::{get_or_download_version, update_bin_exe}, -}; +use crate::cli::{config::read_config, version::get_or_download_version}; use clap::Args; #[derive(Debug, Args)] @@ -12,7 +9,9 @@ impl SelfUpgradeCommand { let config = read_config()?; get_or_download_version(&reqwest, &config.last_checked_updates.unwrap().1)?; - update_bin_exe()?; + // a call to `update_bin_exe` or other similar function *should* be here, in case new versions + // have fixes to bugs in executing other versions, but that would cause + // the current file to be overwritten by itself, so this needs more thought Ok(()) }