diff --git a/lib/server/update.js b/lib/server/update.js index 723eb8df..88f7e634 100644 --- a/lib/server/update.js +++ b/lib/server/update.js @@ -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); }); };