allow symlinking during test

This commit is contained in:
bit-aloo 2025-09-16 21:18:58 +05:30
parent ce4604e34e
commit 24ed1a0455
No known key found for this signature in database

View file

@ -160,7 +160,7 @@ impl Drop for TimeIt {
/// Symlinks two directories, using junctions on Windows and normal symlinks on
/// Unix.
pub fn symlink_dir(config: &Config, original: &Path, link: &Path) -> io::Result<()> {
if config.dry_run() {
if config.dry_run() && !cfg!(test) {
return Ok(());
}
let _ = fs::remove_dir_all(link);