Skip to content

Commit

Permalink
refactor(version-control-systems): Reduce visibility of `CommandLineT…
Browse files Browse the repository at this point in the history
…ool`s

The fact that CLIs are used is an implementation detail that should be
hidden away as much as possible.

Note that because these changes are in plugins (and not in public API of
core modules), they should not be regarded as breaking changes.

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Dec 10, 2024
1 parent a450c04 commit d88c122
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private data class Include(
val name: String
)

object GitRepoCommand : CommandLineTool {
internal object GitRepoCommand : CommandLineTool {
override fun command(workingDir: File?) = "repo"

override fun transformVersion(output: String): String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import org.ossreviewtoolkit.utils.common.ProcessCapture
const val MERCURIAL_LARGE_FILES_EXTENSION = "largefiles = "
const val MERCURIAL_SPARSE_EXTENSION = "sparse = "

object MercurialCommand : CommandLineTool {
internal object MercurialCommand : CommandLineTool {
private val versionRegex = Regex("Mercurial .*\\([Vv]ersion (?<version>[\\d.]+)\\)")

override fun command(workingDir: File?) = "hg"
Expand Down

0 comments on commit d88c122

Please sign in to comment.