application.PartialCommitFetch.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of specmatic-executable Show documentation
Show all versions of specmatic-executable Show documentation
Command-line standalone executable jar for Specmatic
package application
import `in`.specmatic.core.git.GitCommand
import `in`.specmatic.core.utilities.exceptionCauseMessage
val getFileContentAtSpecifiedCommit = {
gitRoot: GitCommand -> { relativeContractPath: String -> { contractPath: String -> { commit: String ->
try {
Outcome(gitRoot.show(commit, relativeContractPath).trim())
} catch (e: Throwable) {
Outcome(null, "Could not load ${commit}:${contractPath} because of error:\n${exceptionCauseMessage(e)}")
}
} } } }