From 26c0bb4902091f7c29c116710f1d05bbd01628b7 Mon Sep 17 00:00:00 2001 From: Inga Lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Wed, 5 Oct 2016 11:58:50 +0300 Subject: [PATCH] nodegit updated to v0.16.0 --- BuildServer/lib/git/loader.js | 9 +++++---- BuildServer/package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/BuildServer/lib/git/loader.js b/BuildServer/lib/git/loader.js index c5863e0..c97f7be 100644 --- a/BuildServer/lib/git/loader.js +++ b/BuildServer/lib/git/loader.js @@ -36,10 +36,11 @@ module.exports = function (options, globalCallback) { console.log("Cloning %s to %s", url, path); - nodegit.Repo.clone(url, path, null /*new nodegit.CloneOptions({"checkout_branch": options.branch})*/, function (err, repo) { - if (err) { + nodegit.Clone(url, path) + .catch(function(err) { return globalCallback(err); - } + }) + .then(function (repo) { console.log("Cloned %s to %s", url, path); @@ -53,5 +54,5 @@ module.exports = function (options, globalCallback) { gitToFs(commit, exported, globalCallback); }); - }); + }); }; diff --git a/BuildServer/package.json b/BuildServer/package.json index 838035f..a10f382 100644 --- a/BuildServer/package.json +++ b/BuildServer/package.json @@ -15,7 +15,7 @@ "graceful-fs": "^4.1.2", "jade": "*", "mustache": "~0.8.1", - "nodegit": "~0.1.4", + "nodegit": "~0.16.0", "nodemailer": "~0.6.0", "recursive-tree-copy": "0.0.1", "underscore": "^1.8.3"