Skip to content

Commit

Permalink
fix: swift path on macos
Browse files Browse the repository at this point in the history
Fixes #3288
  • Loading branch information
jdx committed Nov 29, 2024
1 parent f8fc242 commit b01a8aa
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/plugins/core/swift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ impl SwiftPlugin {

fn install(&self, ctx: &InstallContext, tv: &ToolVersion, tarball_path: &Path) -> Result<()> {
let filename = tarball_path.file_name().unwrap().to_string_lossy();
let version = &tv.version;
ctx.pr.set_message(format!("extract {filename}"));
if cfg!(macos) {
let tmp = {
Expand All @@ -77,11 +78,7 @@ impl SwiftPlugin {
.execute()?;
file::remove_all(tv.install_path())?;
file::rename(
tmp.join("pkg")
.join(format!(
"swift-{version}-RELEASE-osx-package.pkg",
version = tv.version
))
tmp.join(format!("swift-{version}-RELEASE-osx-package.pkg",))
.join("Payload"),
tv.install_path(),
)?;
Expand Down

0 comments on commit b01a8aa

Please sign in to comment.