From 4813be3f4a45c334a6fa6f2646666c34d80c54b8 Mon Sep 17 00:00:00 2001 From: Marcel Bochtler Date: Wed, 21 Aug 2024 14:35:47 +0200 Subject: [PATCH] fix(conan): Ensure that Conan is running in non-interactive mode In some cases Conan falls back to an interactive terminal, e.g. when requiring credentials for a remote. Avoid blocking the ORT process by disabling interactive mode for the Conan CLI and fail instead [1]. [1]: https://docs.conan.io/1/reference/env_vars.html#conan-non-interactive Signed-off-by: Marcel Bochtler --- plugins/package-managers/conan/src/main/kotlin/Conan.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/package-managers/conan/src/main/kotlin/Conan.kt b/plugins/package-managers/conan/src/main/kotlin/Conan.kt index 31c91bad63a35..62355a388a69d 100644 --- a/plugins/package-managers/conan/src/main/kotlin/Conan.kt +++ b/plugins/package-managers/conan/src/main/kotlin/Conan.kt @@ -148,6 +148,9 @@ class Conan( pkgInspectResults.clear() } + override fun run(vararg args: CharSequence, workingDir: File?, environment: Map) = + super.run(args = args, workingDir = workingDir, environment = environment + ("CONAN_NON_INTERACTIVE" to "1")) + private fun resolvedDependenciesInternal(definitionFile: File): List { val workingDir = definitionFile.parentFile