From 084458515d83fd7643c62e2ec4052da4389276d4 Mon Sep 17 00:00:00 2001 From: ritvick Date: Wed, 25 Sep 2024 15:31:19 -0400 Subject: [PATCH] Support for AIX OS on ppc64 --- .../com/moowork/gradle/node/util/PlatformHelper.groovy | 10 ++++++++++ .../moowork/gradle/node/util/PlatformHelperTest.groovy | 1 + 2 files changed, 11 insertions(+) diff --git a/src/main/groovy/com/moowork/gradle/node/util/PlatformHelper.groovy b/src/main/groovy/com/moowork/gradle/node/util/PlatformHelper.groovy index 981ae12..fc7bf5a 100644 --- a/src/main/groovy/com/moowork/gradle/node/util/PlatformHelper.groovy +++ b/src/main/groovy/com/moowork/gradle/node/util/PlatformHelper.groovy @@ -50,12 +50,22 @@ class PlatformHelper return "sunos" } + if ( name.contains( "aix" ) ) + { + return "aix" + } + throw new IllegalArgumentException( "Unsupported OS: " + name ) } public String getOsArch() { final String arch = property( "os.arch" ).toLowerCase() + // Adding support for AIX on on ppc64 + if ( arch.contains( "ppc64" ) ) + { + return "ppc64" + } if ( arch.contains( "64" ) ) { return "x64" diff --git a/src/test/groovy/com/moowork/gradle/node/util/PlatformHelperTest.groovy b/src/test/groovy/com/moowork/gradle/node/util/PlatformHelperTest.groovy index 2bb37d3..a0f4350 100644 --- a/src/test/groovy/com/moowork/gradle/node/util/PlatformHelperTest.groovy +++ b/src/test/groovy/com/moowork/gradle/node/util/PlatformHelperTest.groovy @@ -38,6 +38,7 @@ class PlatformHelperTest 'Linux' | 'x86_64' | 'linux' | 'x64' | false 'SunOS' | 'x86' | 'sunos' | 'x86' | false 'SunOS' | 'x86_64' | 'sunos' | 'x64' | false + 'AIX' | 'ppc64' | 'aix' | 'ppc64' | false } def "throw exception if unsupported os"()