From f2667bfcae74a4560004f98e05f6ef3d060d0fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Cruz?= Date: Sun, 14 Apr 2013 17:46:18 +0100 Subject: [PATCH] Bug fixes on the git fs resolver. --- lib/resolve/resolvers/GitFsResolver.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/resolve/resolvers/GitFsResolver.js b/lib/resolve/resolvers/GitFsResolver.js index 77e783c3..c5ed300e 100644 --- a/lib/resolve/resolvers/GitFsResolver.js +++ b/lib/resolve/resolvers/GitFsResolver.js @@ -43,14 +43,14 @@ GitFsResolver.prototype._copy = function () { // Copy folder contents .then(function () { return Q.nfcall(ncp, this._source, tempDir); - }); + }.bind(this)); }; GitFsResolver.prototype._fetch = function () { var dir = this._tempDir; // Check if there is at least one remote - cmd('git', ['remote'], { cwd: dir }) + return cmd('git', ['remote'], { cwd: dir }) .then(function (stdout) { var hasRemote = !!stdout.trim().length; @@ -68,7 +68,7 @@ GitFsResolver.prototype._checkout = function (resolution) { console.log(resolution); // Checkout resolution - cmd('git', ['checkout', '-f', resolution.tag || resolution.branch || resolution.commit], { cwd: dir }) + return cmd('git', ['checkout', '-f', resolution.tag || resolution.branch || resolution.commit], { cwd: dir }) // Cleanup unstagged files .then(function () { return cmd('git', ['clean', '-f', '-d'], { cwd: dir });