From 9246e35a5da209d439b383770c294b0b45b59ee3 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 25 Jun 2014 10:25:04 -0400 Subject: [PATCH] refactor(update) get --- lib/server/update.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); }); };