From 2abe04132b4a9ae3b5f469cf928beb39b5849135 Mon Sep 17 00:00:00 2001 From: Artem Daugel-Dauge Date: Wed, 14 Jun 2023 15:37:16 +0200 Subject: [PATCH] [Tests] Try to make CocoaPods installation more robust --- .../kotlin/gradle/testbase/cocoapodsTestHelpers.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/testbase/cocoapodsTestHelpers.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/testbase/cocoapodsTestHelpers.kt index 6d1241e04cc..492023de8b1 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/testbase/cocoapodsTestHelpers.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/testbase/cocoapodsTestHelpers.kt @@ -165,8 +165,13 @@ fun ensureCocoapodsInstalled() { val installDir = cocoapodsInstallationRoot.absolutePathString() println("Installing CocoaPods...") - //https://github.com/ffi/ffi/issues/864#issuecomment-875242776 - gem("install", "--install-dir", installDir, "ffi", "-v", "1.15.5", "--", "--enable-libffi-alloc") + try { + //https://github.com/ffi/ffi/issues/864#issuecomment-875242776 + gem("install", "--install-dir", installDir, "ffi", "-v", "1.15.5", "--", "--enable-libffi-alloc") + } catch (e: Exception) { + System.err.println("ffi installation with '--enable-libffi-alloc' has failed but we'll try to continue with a default ffi") + System.err.println(e.toString()) + } gem("install", "--install-dir", installDir, "cocoapods", "-v", TestVersions.COCOAPODS.VERSION) } else if (!isCocoapodsInstalled()) {