mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(update) get
This commit is contained in:
parent
ab13f6b793
commit
9246e35a5d
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue