Skip to content

Commit

Permalink
fix sysroot copying logic for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed May 19, 2024
1 parent 132bd04 commit bcf5fa9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,9 @@ panic = 'unwind'
fs::remove_dir_all(&sysroot_target_dir)
.context("failed to clean sysroot target dir")?;
}
fs::create_dir_all(&sysroot_target_dir).context("failed to create target directory")?;
// Create the *parent* directroy so we can move into it.
fs::create_dir_all(&sysroot_target_dir.parent().unwrap())
.context("failed to create target directory")?;
fs::rename(staging_dir.path(), sysroot_target_dir).context("failed installing sysroot")?;

Ok(SysrootStatus::SysrootBuilt)
Expand Down

0 comments on commit bcf5fa9

Please sign in to comment.