Skip to content

Commit 9e9187f

Browse files
committed
Map Amazon Linux 2023 to amazonlinux2023 toolchain infix
Amazon Linux 2023 reports ID=amzn and VERSION_ID=2023 in /etc/os-release. This combination fell through to the generic else branch, producing the OS name amzn2023 and thus an invalid Swift toolchain download URL (swift-...-amzn2023-aarch64.tar.gz), causing a "Toolchain not found" failure. Special-case it to the amazonlinux2023 infix that swift.org actually publishes.
1 parent 72dc949 commit 9e9187f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/scripts/install-and-build-with-sdk.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,9 @@ initialize_os_info() {
485485
elif [[ "$os_id" == "amzn" && "$version_id" == "2" ]]; then
486486
OS_NAME="amazonlinux2"
487487
OS_NAME_NO_DOT="amazonlinux2"
488+
elif [[ "$os_id" == "amzn" && "$version_id" == "2023" ]]; then
489+
OS_NAME="amazonlinux2023"
490+
OS_NAME_NO_DOT="amazonlinux2023"
488491
else
489492
# Ubuntu, Debian, Fedora
490493
OS_NAME="${os_id}${version_id}"

0 commit comments

Comments
 (0)