From eb78f5e1cadb26ca6fc64521df1b6821736b822d Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Wed, 9 Feb 2022 11:45:54 +0300 Subject: [PATCH] Native: make xcrun failures a bit more useful again ^KT-50923 --- .../main/kotlin/org/jetbrains/kotlin/konan/target/Xcode.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/Xcode.kt b/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/Xcode.kt index 92daeb51b3c..cacd3dcc3d8 100644 --- a/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/Xcode.kt +++ b/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/Xcode.kt @@ -92,9 +92,13 @@ private object CurrentXcode : Xcode { private fun xcrun(vararg args: String): String = try { Command("/usr/bin/xcrun", *args).getOutputLines().first() } catch (e: KonanExternalToolFailure) { + // TODO: we should make the message below even more clear and actionable. + // Maybe add a link to the documentation. + // See https://youtrack.jetbrains.com/issue/KT-50923. val message = """ An error occurred during an xcrun execution. Make sure that Xcode and its command line tools are properly installed. Failed command: /usr/bin/xcrun ${args.joinToString(" ")} + Try running this command in Terminal and fix the errors by making Xcode (and its command line tools) configuration correct. """.trimIndent() throw MissingXcodeException(message, e) }