Comparing version 0.2.2 to 0.2.3
@@ -6,9 +6,11 @@ 'use strict'; | ||
const headHash = (option) => { | ||
const config = Object.assign({}, option); | ||
return new Promise((resolve, reject) => { | ||
const cmd = [ | ||
const command = [ | ||
'git rev-parse --verify', | ||
option.short ? ' --short' : '', | ||
config.short ? ' --short' : '', | ||
' HEAD' | ||
].join(''); | ||
exec(cmd, (err, stdout) => { | ||
exec(command, { cwd : config.cwd }, (err, stdout) => { | ||
if (err) { | ||
@@ -15,0 +17,0 @@ reject(err); |
{ | ||
"name": "head-hash", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Get the current commit hash.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/sholladay/head-hash", |
18985
20