Handle errors from 'git status'

This commit is contained in:
Max Brunsfeld 2015-09-14 17:34:41 -07:00
parent 0143b133fe
commit 01a73e3ad3

View File

@ -36,6 +36,8 @@ function parseArguments(next) {
function checkCleanWorkingTree(next) {
console.log('Checking for a clean working tree');
exec('git status --porcelain', function(error, output) {
if (error) return next(error)
var modifiedEntries = output.split('\n').filter(function(line) {
return !/^\?\?/.test(line) && line.length > 0
});