diff --git a/registry.toml b/registry.toml index 69aa528a98..8c337cb7b7 100644 --- a/registry.toml +++ b/registry.toml @@ -93,7 +93,7 @@ bat.backends = ["ubi:sharkdp/bat", "asdf:https://gitlab.com/wt0f/asdf-bat"] bat-extras.backends = ["asdf:vhdirk/asdf-bat-extras"] bats.backends = ["aqua:bats-core/bats-core", "asdf:timgluz/asdf-bats"] bats.os = ["linux", "macos"] -bats.test = ["bats -v", "Bats {{version}}"] +bats.test = ["bats -v", "Bats"] bazel.backends = ["ubi:bazelbuild/bazel", "asdf:rajatvig/asdf-bazel"] bazel.test = ["bazel --version", "bazel {{version}}"] bazelisk.backends = ["aqua:bazelbuild/bazelisk", "asdf:josephtate/asdf-bazelisk"] diff --git a/src/plugins/core/swift.rs b/src/plugins/core/swift.rs index 55414cecac..a5575680a4 100644 --- a/src/plugins/core/swift.rs +++ b/src/plugins/core/swift.rs @@ -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 = { @@ -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(), )?;