Merge pull request #18 from tarzak/patch-1

feature(update) add git check
This commit is contained in:
coderaiser 2014-06-25 16:46:26 +03:00
commit d07a2bda7a

View file

@ -18,8 +18,13 @@
Util = main.util,
DIR = main.DIR;
exports.get = function(){
exec('git pull --rebase', {cwd : DIR}, pull);
exports.get = function() {
fs.readdir(DIR, function(err, list) {
var isGit = list.indexOf('.git') >= 0;
if (!err && isGit)
exec('git pull --rebase', {cwd : DIR}, pull);
});
};
/**