Fix logging inside ensureRefAvailable()

This commit is contained in:
Michal Dorner 2021-04-12 22:22:57 +02:00
parent 0b18612ac3
commit f1c461fccf
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
2 changed files with 2 additions and 13 deletions

View file

@ -198,12 +198,7 @@ export function isGitSha(ref: string): boolean {
}
async function hasCommit(ref: string): Promise<boolean> {
core.startGroup(`Checking if commit for ${ref} is locally available`)
try {
return (await exec('git', ['cat-file', '-e', `${ref}^{commit}`], {ignoreReturnCode: true})).code === 0
} finally {
core.endGroup()
}
return (await exec('git', ['cat-file', '-e', `${ref}^{commit}`], {ignoreReturnCode: true})).code === 0
}
async function getCommitCount(): Promise<number> {