exec git with --no-color #24

Merged
merged 1 commit into from Jul 23, 2012
Jump to file
+2 −2
Split
View
@@ -3,7 +3,7 @@ var spawn = require('child_process').spawn;
var path = require('path');
exports.commit = function (cb) {
- exec('git log | head -n1', function (err, stdout, stderr) {
+ exec('git log --no-color | head -n1', function (err, stdout, stderr) {
if (err) cb(err)
else if (stderr) cb(new Error(stderr))
else cb(null, stdout.trim().split(/\s+/)[1]);
@@ -53,7 +53,7 @@ exports.dir = function (cwd) {
};
exports.branchName = function (cb) {
- exec('git branch', function (err, stdout, stderr) {
+ exec('git branch --no-color', function (err, stdout, stderr) {
if (err) cb(err)
else if (stderr) cb(new Error(stderr))
else {