File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -91,12 +91,15 @@ private class RepositoryDeserializer : StdDeserializer<Repository>(Repository::c
9191 val parsedProvenance = when {
9292 node.has(" vcs" ) -> {
9393 // Parse [vcs] and [vcsProcessed] attributes
94- val vcsInfo = jsonMapper.treeToValue<VcsInfo >(node[" vcs" ])
94+ val vcs = jsonMapper.treeToValue<VcsInfo >(node[" vcs" ])
9595 val vcsProcess = jsonMapper.treeToValue<VcsInfo >(node[" vcs_processed" ])
9696
97+ // Fall back to [vcsProcessed], if [vcs] is empty
98+ val vcsInfo = if (vcs != VcsInfo .EMPTY ) vcs else vcsProcess
99+
97100 // Get the [vcs]'s revision
98- val resolvedRevision = if (vcsInfo .revision != " " ) {
99- vcsInfo .revision
101+ val resolvedRevision = if (vcs .revision != " " ) {
102+ vcs .revision
100103 } else if (vcsProcess.revision != " " ) {
101104 // Fall back to [vcsProcessed], if [vcs] has empty revision
102105 vcsProcess.revision
You can’t perform that action at this time.
0 commit comments