We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bf228a commit 340465bCopy full SHA for 340465b
index.js
@@ -64,11 +64,12 @@ module.exports = function(gitPath) {
64
var packedRefsFilePath = path.join(gitPath, 'packed-refs');
65
if (fs.existsSync(packedRefsFilePath)) {
66
var packedRefsFile = fs.readFileSync(packedRefsFilePath, {encoding: 'utf8'});
67
- var tagLine = packedRefsFile.split('\n').filter(function(l) {
68
- return l.indexOf("refs/tags") > -1 && l.indexOf(result.sha) > -1;
+ var tagLine = packedRefsFile.split('\n').filter(function(line) {
+ return line.indexOf("refs/tags") > -1 && line.indexOf(result.sha) > -1;
69
})[0];
70
+
71
if (tagLine) {
- result.tag = tagLine.split('tags/')[1]
72
+ result.tag = tagLine.split('tags/')[1];
73
}
74
75
0 commit comments