Skip to content

Commit 5bfaef3

Browse files
ritvickdeepy
authored andcommitted
Support for AIX OS on ppc64
1 parent da4fbb6 commit 5bfaef3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/main/kotlin/com/github/gradle/node/util/PlatformHelper.kt

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ fun parseOsName(name: String): String {
1313
name.contains("linux") -> "linux"
1414
name.contains("freebsd") -> "linux"
1515
name.contains("sunos") -> "sunos"
16+
name.contains("aix") -> "aix"
1617
else -> error("Unsupported OS: $name")
1718
}
1819
}
@@ -26,6 +27,7 @@ fun parseOsArch(arch: String, uname: Callable<String>): String {
2627
arch == "arm" || arch.startsWith("aarch") -> uname.call()
2728
.mapIf({ it == "armv8l" || it == "aarch64" }) { "arm64" }
2829
.mapIf({ it == "x86_64" }) {"x64"}
30+
arch == "ppc64" -> "ppc64"
2931
arch == "ppc64le" -> "ppc64le"
3032
arch == "s390x" -> "s390x"
3133
arch.contains("64") -> "x64"

src/test/groovy/com/github/gradle/node/util/PlatformHelperTest.groovy

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class PlatformHelperTest extends Specification {
2727
'Linux' | 's390x' | 'linux' | 's390x' | false
2828
'SunOS' | 'x86' | 'sunos' | 'x86' | false
2929
'SunOS' | 'x86_64' | 'sunos' | 'x64' | false
30+
'AIX' | 'ppc64' | 'aix' | 'ppc64' | false
3031
}
3132

3233
@Unroll

0 commit comments

Comments
 (0)