From 31bd9ba54cf887f7e2fd4d9e7c18f498181d1e13 Mon Sep 17 00:00:00 2001 From: Ian Nelson <68447602+spyder-ian@users.noreply.github.com> Date: Sun, 26 Jan 2025 12:41:25 -0700 Subject: [PATCH] fix: Swift on Ubuntu 24.04 arm64 generates the incorrect download URL (#4235) * Fixing Ubuntu 24.04 on arm64 * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- src/plugins/core/swift.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/core/swift.rs b/src/plugins/core/swift.rs index 029ce9d2a4..d735a55922 100644 --- a/src/plugins/core/swift.rs +++ b/src/plugins/core/swift.rs @@ -197,6 +197,14 @@ fn platform_directory() -> String { "xcode".into() } else if cfg!(windows) { "windows10".into() + } else if let Ok(os_release) = &*os_release::OS_RELEASE { + let arch = SETTINGS.arch(); + if os_release.id == "ubuntu" && arch == "aarch64" { + let retval = format!("{}{}-{}", os_release.id, os_release.version_id, arch); + retval.replace(".", "") + } else { + platform().replace(".", "") + } } else { platform().replace(".", "") }