Skip to content

Commit 96783c1

Browse files
nnobelissschuberth
authored andcommitted
fix(conan): Fix Conan profile path and file Analyzer roots
This fixes a bug when the Analyzer is called on a single definition file, not on a directory. This is a fixup for f4aa910. Signed-off-by: Nicolas Nobelis <[email protected]>
1 parent bf78d00 commit 96783c1

File tree

1 file changed

+2
-1
lines changed
  • plugins/package-managers/conan/src/main/kotlin

1 file changed

+2
-1
lines changed

plugins/package-managers/conan/src/main/kotlin/Conan.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ class Conan(
222222
}
223223

224224
val resolvedProfilePath = config.conanProfilePath?.let { profilePath ->
225-
analysisRoot / profilePath
225+
val analysisRootDir = if (analysisRoot.isFile) analysisRoot.parentFile else analysisRoot
226+
analysisRootDir / profilePath
226227
}
227228

228229
val handlerResults = handler.process(definitionFile, config.lockfileName, resolvedProfilePath)

0 commit comments

Comments
 (0)