mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 04:02:12 +00:00
Fetch remote git only if repo has a remote
This commit is contained in:
parent
c949548150
commit
0d18266ad1
@ -29,7 +29,18 @@ module.exports = NodeHelper.create({
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
simpleGits.push({"module": moduleName, "git": SimpleGit(moduleFolder)});
|
var res = function(mn, mf) {
|
||||||
|
var git = SimpleGit(mf);
|
||||||
|
git.getRemotes(true, function(err, remotes) {
|
||||||
|
if (remotes.length < 1 || remotes[0].name.length < 1) {
|
||||||
|
// No valid remote for folder, skip
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Folder has .git and has at least one git remote, watch this folder
|
||||||
|
simpleGits.push({"module": mn, "git": git});
|
||||||
|
});
|
||||||
|
}(moduleName, moduleFolder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user