From 644abcb96b507450798899aca25ef1b15c33e215 Mon Sep 17 00:00:00 2001 From: Paul LeMarquand Date: Wed, 14 May 2025 10:25:22 -0400 Subject: [PATCH] Append file extension to downloaded toolchain The `installer` tool fails to install the toolchain on macOS unless `.pkg` is present in the filename. Otherwise it produces the error: "Error - the package path specified was invalid" Add the appropriate file extension when downloading the toolchain so the installer can use it correctly. --- Sources/Swiftly/Install.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Swiftly/Install.swift b/Sources/Swiftly/Install.swift index 902844a2..2a968d08 100644 --- a/Sources/Swiftly/Install.swift +++ b/Sources/Swiftly/Install.swift @@ -188,7 +188,7 @@ struct Install: SwiftlyCommand { await ctx.print("Installing \(version)") - let tmpFile = fs.mktemp() + let tmpFile = fs.mktemp(ext: ".\(Swiftly.currentPlatform.toolchainFileExtension)") try await fs.create(file: tmpFile, contents: nil) return try await fs.withTemporary(files: tmpFile) { var platformString = config.platform.name