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
91
91
val parsedProvenance = when {
92
92
node.has(" vcs" ) -> {
93
93
// Parse [vcs] and [vcsProcessed] attributes
94
- val vcsInfo = jsonMapper.treeToValue<VcsInfo >(node[" vcs" ])
94
+ val vcs = jsonMapper.treeToValue<VcsInfo >(node[" vcs" ])
95
95
val vcsProcess = jsonMapper.treeToValue<VcsInfo >(node[" vcs_processed" ])
96
96
97
+ // Fall back to [vcsProcessed], if [vcs] is empty
98
+ val vcsInfo = if (vcs != VcsInfo .EMPTY ) vcs else vcsProcess
99
+
97
100
// Get the [vcs]'s revision
98
- val resolvedRevision = if (vcsInfo .revision != " " ) {
99
- vcsInfo .revision
101
+ val resolvedRevision = if (vcs .revision != " " ) {
102
+ vcs .revision
100
103
} else if (vcsProcess.revision != " " ) {
101
104
// Fall back to [vcsProcessed], if [vcs] has empty revision
102
105
vcsProcess.revision
You can’t perform that action at this time.
0 commit comments