Skip to content

Commit

Permalink
Downloader: Record the actual remote URL in the RepositoryProvenance
Browse files Browse the repository at this point in the history
Earlier fallbacks might have tampered with the original URL (e.g. by
stripping credentials), so the `RepositoryProvenance` should record the
actual URL being used for creating the `WorkingTree`.

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Sep 23, 2022
1 parent 01fc038 commit 8e2ea6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion downloader/src/main/kotlin/Downloader.kt
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class Downloader(private val config: DownloaderConfiguration) {
"Finished downloading source code revision '$resolvedRevision' to '${outputDirectory.absolutePath}'."
}

return RepositoryProvenance(pkg.vcsProcessed, resolvedRevision)
return RepositoryProvenance(pkg.vcsProcessed.copy(url = workingTree.getRemoteUrl()), resolvedRevision)
}

/**
Expand Down

0 comments on commit 8e2ea6a

Please sign in to comment.