last-commit-log
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -29,9 +29,12 @@ 'use strict' | ||
c = stdout.split(splitCharacter) | ||
const { stdout: branch } = await exec('git name-rev --name-only HEAD', opts) | ||
const { stdout: revParseBranch } = await exec('git rev-parse --abbrev-ref HEAD', opts) | ||
const { stdout: nameRevBranch } = await exec('git name-rev --name-only HEAD', opts) | ||
const { stdout: tag } = await exec('git tag --contains HEAD', opts) | ||
gitBranch = branch.trim().replace('remotes/origin/', '') | ||
const branch1 = revParseBranch.trim() | ||
const branch2 = nameRevBranch.trim().replace('remotes/origin/', '') | ||
gitBranch = branch1 === 'HEAD' ? branch2 : branch1 | ||
gitTag = tag.trim() | ||
gitRemote = await gitRemoteOriginUrl(this.cwd) | ||
} catch (e) { | ||
throw new Error(`Can't get last commit, ${e.stderr}`) | ||
throw new Error(`Can't get last commit, ${e}`) | ||
} | ||
@@ -38,0 +41,0 @@ return ({ |
{ | ||
"name": "last-commit-log", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "read git last commit log", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7265
76