diff --git a/src/main/kotlin/com/github/gradle/node/util/PlatformHelper.kt b/src/main/kotlin/com/github/gradle/node/util/PlatformHelper.kt index b25e27e0..ee9f7c1d 100644 --- a/src/main/kotlin/com/github/gradle/node/util/PlatformHelper.kt +++ b/src/main/kotlin/com/github/gradle/node/util/PlatformHelper.kt @@ -13,6 +13,7 @@ fun parseOsName(name: String): String { name.contains("linux") -> "linux" name.contains("freebsd") -> "linux" name.contains("sunos") -> "sunos" + name.contains("aix") -> "aix" else -> error("Unsupported OS: $name") } } @@ -26,6 +27,7 @@ fun parseOsArch(arch: String, uname: Callable): String { arch == "arm" || arch.startsWith("aarch") -> uname.call() .mapIf({ it == "armv8l" || it == "aarch64" }) { "arm64" } .mapIf({ it == "x86_64" }) {"x64"} + arch == "ppc64" -> "ppc64" arch == "ppc64le" -> "ppc64le" arch == "s390x" -> "s390x" arch.contains("64") -> "x64" diff --git a/src/test/groovy/com/github/gradle/node/util/PlatformHelperTest.groovy b/src/test/groovy/com/github/gradle/node/util/PlatformHelperTest.groovy index dd2f413e..c90d6983 100644 --- a/src/test/groovy/com/github/gradle/node/util/PlatformHelperTest.groovy +++ b/src/test/groovy/com/github/gradle/node/util/PlatformHelperTest.groovy @@ -27,6 +27,7 @@ class PlatformHelperTest extends Specification { 'Linux' | 's390x' | 'linux' | 's390x' | false 'SunOS' | 'x86' | 'sunos' | 'x86' | false 'SunOS' | 'x86_64' | 'sunos' | 'x64' | false + 'AIX' | 'ppc64' | 'aix' | 'ppc64' | false } @Unroll