mirror of
https://github.com/pesde-pkg/pesde.git
synced 2024-12-12 11:00:36 +00:00
fix: fix self-install cross-device move
This commit is contained in:
parent
00b470b173
commit
5a82f8616f
2 changed files with 8 additions and 2 deletions
|
@ -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-install` doing a cross-device move by @daimond113
|
||||
|
||||
## [0.5.0-rc.9] - 2024-11-16
|
||||
### Fixed
|
||||
- Correctly link Wally server packages by @daimond113
|
||||
|
|
|
@ -287,11 +287,13 @@ pub async fn update_bin_exe(downloaded_file: &Path) -> anyhow::Result<()> {
|
|||
));
|
||||
let mut downloaded_file = downloaded_file.to_path_buf();
|
||||
|
||||
if cfg!(target_os = "linux") && bin_exe_path.exists() {
|
||||
let exists = bin_exe_path.exists();
|
||||
|
||||
if cfg!(target_os = "linux") && exists {
|
||||
fs::remove_file(&bin_exe_path)
|
||||
.await
|
||||
.context("failed to remove existing executable")?;
|
||||
} else {
|
||||
} else if exists {
|
||||
let tempfile = tempfile::Builder::new()
|
||||
.make(|_| Ok(()))
|
||||
.context("failed to create temporary file")?;
|
||||
|
|
Loading…
Reference in a new issue