Skip to content

Commit

Permalink
fix: Swift on Ubuntu 24.04 arm64 generates the incorrect download URL (
Browse files Browse the repository at this point in the history
…#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>
  • Loading branch information
spyder-ian and autofix-ci[bot] authored Jan 26, 2025
1 parent 052cb4d commit 31bd9ba
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/plugins/core/swift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(".", "")
}
Expand Down

0 comments on commit 31bd9ba

Please sign in to comment.