refactor(update) get

This commit is contained in:
coderaiser 2014-06-25 10:25:04 -04:00
parent ab13f6b793
commit 9246e35a5d

View file

@ -21,10 +21,10 @@
exports.get = function() {
fs.readdir(DIR, function(error, files) {
var isGit = !~files.indexOf('.git');
var cmd = 'git pull --rebase';
if (!error && isGit)
exec('git pull --rebase', {cwd : DIR}, pull);
if (!error && ~files.indexOf('.git'))
exec(cmd, {cwd : DIR}, pull);
});
};