Skip to content

Commit

Permalink
refactor(conan): Slightly simplify the code for obtaining the URL
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Viernau <[email protected]>
  • Loading branch information
fviernau committed Jul 17, 2024
1 parent 0e6649b commit eec778c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/package-managers/conan/src/main/kotlin/Conan.kt
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ class Conan(
val artifactEntry = conanData.getValue("sources")

val url = artifactEntry["url"].let { urlNode ->
(urlNode.takeIf { it.isTextual } ?: urlNode.first()).textValueOrEmpty()
}
urlNode.takeIf { it.isTextual } ?: urlNode.first()
}.textValueOrEmpty()

val hashValue = artifactEntry["sha256"].textValueOrEmpty()
val hash = Hash.create(hashValue, HashAlgorithm.SHA256.name)
Expand Down

0 comments on commit eec778c

Please sign in to comment.