mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
Merge pull request #18 from tarzak/patch-1
feature(update) add git check
This commit is contained in:
commit
d07a2bda7a
1 changed files with 7 additions and 2 deletions
|
|
@ -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);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue