Comparing version 1.2.0 to 1.2.1
@@ -56,7 +56,8 @@ #!/usr/bin/env node | ||
} | ||
exec('git rev-parse --abbrev-ref HEAD', function (err, stdout, stderr) { | ||
exec('git rev-parse HEAD', function (err, stdout, stderr) { | ||
if (err) { | ||
throw err; | ||
} | ||
var originalRef = stdout.toString('utf-8').replace(/\n/, ''); | ||
var originalSha = stdout.toString('utf-8').replace(/\n/, ''); | ||
async.eachLimit(refs, 1, function (ref, cb) { | ||
@@ -68,6 +69,6 @@ if (ref === 'working dir') { | ||
exec('git stash', passError(cb, function () { | ||
exec('git checkout ' + ref.replace(/^HEAD/, originalRef), true, passError(cb, proceedToRunBenchmark)); | ||
exec('git checkout ' + ref.replace(/^HEAD/, originalSha), true, passError(cb, proceedToRunBenchmark)); | ||
})); | ||
} else { | ||
exec('git checkout ' + ref.replace(/^HEAD/, originalRef), true, passError(cb, proceedToRunBenchmark)); | ||
exec('git checkout ' + ref.replace(/^HEAD/, originalSha), true, passError(cb, proceedToRunBenchmark)); | ||
} | ||
@@ -81,7 +82,7 @@ } | ||
mochaArgs, passError(cb, function (stdout, stderr) { | ||
var result = JSON.parse(stdout.toString('utf-8')); | ||
result.ref = ref; | ||
results.push(result); | ||
cb(); | ||
})); | ||
var result = JSON.parse(stdout.toString('utf-8')); | ||
result.ref = ref; | ||
results.push(result); | ||
cb(); | ||
})); | ||
} | ||
@@ -122,3 +123,3 @@ }, function (err) { | ||
'on average'); | ||
exec('git checkout ' + originalRef, true, function (err) { | ||
exec('git checkout ' + originalSha, true, function (err) { | ||
function onFinish() { | ||
@@ -125,0 +126,0 @@ if (typeof argv.threshold === 'number' && argv.threshold <= -avg * 100) { |
{ | ||
"name": "chewbacca", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "A benchmark tool for Mocha test that will run the body of each test many times.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
13616