Skip to content

Commit

Permalink
fix(conan): Ensure that Conan is running in non-interactive mode
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
MarcelBochtler authored and sschuberth committed Aug 22, 2024
1 parent 549a0dd commit 4813be3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/package-managers/conan/src/main/kotlin/Conan.kt
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ class Conan(
pkgInspectResults.clear()
}

override fun run(vararg args: CharSequence, workingDir: File?, environment: Map<String, String>) =
super.run(args = args, workingDir = workingDir, environment = environment + ("CONAN_NON_INTERACTIVE" to "1"))

private fun resolvedDependenciesInternal(definitionFile: File): List<ProjectAnalyzerResult> {
val workingDir = definitionFile.parentFile

Expand Down

0 comments on commit 4813be3

Please sign in to comment.