mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
refactor(update) get
This commit is contained in:
parent
36bd0ffc75
commit
15c5edec57
1 changed files with 3 additions and 2 deletions
|
|
@ -15,12 +15,13 @@
|
|||
var main = global.cloudcmd.main,
|
||||
mainpackage = main.mainpackage || {},
|
||||
exec = main.child_process.exec,
|
||||
fs = require('fs'),
|
||||
Util = main.util,
|
||||
DIR = main.DIR;
|
||||
|
||||
exports.get = function() {
|
||||
fs.readdir(DIR, function(err, list) {
|
||||
var isGit = list.indexOf('.git') >= 0;
|
||||
fs.readdir(DIR, function(err, files) {
|
||||
var isGit = !~files.indexOf('.git');
|
||||
|
||||
if (!err && isGit)
|
||||
exec('git pull --rebase', {cwd : DIR}, pull);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue