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 });