From 78b1672eebddc80b7c0ad6e30d78092359704700 Mon Sep 17 00:00:00 2001 From: Michal Dorner Date: Mon, 12 Apr 2021 22:31:38 +0200 Subject: [PATCH] Fix missing await --- dist/index.js | 2 +- src/git.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index af2392b..388ef02 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4010,7 +4010,7 @@ async function getCommitCount() { } async function getLocalRef(shortName) { if (isGitSha(shortName)) { - return hasCommit(shortName) ? shortName : undefined; + return await hasCommit(shortName) ? shortName : undefined; } const output = (await exec_1.default('git', ['show-ref', shortName], { ignoreReturnCode: true })).stdout; const refs = output diff --git a/src/git.ts b/src/git.ts index a9ac9b9..4a7572d 100644 --- a/src/git.ts +++ b/src/git.ts @@ -209,7 +209,7 @@ async function getCommitCount(): Promise { async function getLocalRef(shortName: string): Promise { if (isGitSha(shortName)) { - return hasCommit(shortName) ? shortName : undefined + return (await hasCommit(shortName)) ? shortName : undefined } const output = (await exec('git', ['show-ref', shortName], {ignoreReturnCode: true})).stdout