mirror of
https://github.com/bower/bower.git
synced 2026-02-11 14:34:58 -05:00
Bug fixes on the git fs resolver.
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user