fix: also remove_dir_all in symlink_file for directory-type conflicts
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Oleks
2026-03-16 18:42:54 +02:00
parent 0af380cd9a
commit 3c4fcfc3ed
+1 -1
View File
@@ -5,7 +5,7 @@
#[cfg(windows)] #[cfg(windows)]
use std::os::windows::fs::symlink_file; use std::os::windows::fs::symlink_file;
- if !self.config.dry_run() { symlink_file(src.as_ref(), link.as_ref()) } else { Ok(()) } - if !self.config.dry_run() { symlink_file(src.as_ref(), link.as_ref()) } else { Ok(()) }
+ if !self.config.dry_run() { let _ = std::fs::remove_file(link.as_ref()); symlink_file(src.as_ref(), link.as_ref()) } else { Ok(()) } + if !self.config.dry_run() { let _ = std::fs::remove_file(link.as_ref()); let _ = std::fs::remove_dir_all(link.as_ref()); symlink_file(src.as_ref(), link.as_ref()) } else { Ok(()) }
} }
/// Returns if config.ninja is enabled, and checks for ninja existence, /// Returns if config.ninja is enabled, and checks for ninja existence,