File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
plugins/package-managers/bazel/src/main/kotlin Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -703,13 +703,16 @@ private fun ModuleMetadata.toVcsInfo() =
703703private fun ModuleSourceInfo.toRemoteArtifact (): RemoteArtifact ? =
704704 when (this ) {
705705 is ArchiveSourceInfo -> {
706- val (algo, b64digest) = integrity.split(' -' , limit = 2 )
707- val digest = Base64 .decode(b64digest).toHexString()
708-
709- val hash = Hash (
710- value = digest,
711- algorithm = HashAlgorithm .fromString(algo)
712- )
706+ val hash = if (integrity.isNotEmpty()) {
707+ val (algo, b64digest) = integrity.split(' -' , limit = 2 )
708+ val digest = Base64 .decode(b64digest).toHexString()
709+ Hash (
710+ value = digest,
711+ algorithm = HashAlgorithm .fromString(algo)
712+ )
713+ } else {
714+ Hash .NONE
715+ }
713716
714717 RemoteArtifact (url = url.toString(), hash = hash)
715718 }
You can’t perform that action at this time.
0 commit comments