fix: throws error if the commit associated with a tag cannot be found

This commit is contained in:
Pierre Vanduynslager
2019-11-07 14:33:53 -05:00
parent de77a799a8
commit 131734873e
2 changed files with 2 additions and 7 deletions
+1 -5
View File
@@ -14,11 +14,7 @@ Object.assign(gitLogParser.fields, {hash: 'H', message: 'B', gitTags: 'd', commi
* @return {String} The commit sha of the tag in parameter or `null`.
*/
async function getTagHead(tagName, execaOpts) {
try {
return (await execa('git', ['rev-list', '-1', tagName], execaOpts)).stdout;
} catch (error) {
debug(error);
}
return (await execa('git', ['rev-list', '-1', tagName], execaOpts)).stdout;
}
/**