Skip to content

Commit

Permalink
Resolve if git isn't defined
Browse files Browse the repository at this point in the history
  • Loading branch information
rondale-sc committed Jul 13, 2014
1 parent ebf0502 commit 9abcdb1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/tasks/git-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ module.exports = Task.extend({

if(commandOptions.skipGit) { return Promise.resolve(); }

return exec('git init')
return exec('git --version')
.catch(function(){
return Promise.resolve();
})
.then(function() {
return exec('git init');
})
.then(function() {
return exec('git add .');
})
Expand Down

0 comments on commit 9abcdb1

Please sign in to comment.