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 authored and sschuberth committed Jul 18, 2024
1 parent af02a8c commit 5dbe633
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 5dbe633

Please sign in to comment.