mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
Do not install if there is a conflict.
This commit is contained in:
@@ -42,7 +42,8 @@ Manager.prototype.constructor = Manager;
|
||||
|
||||
Manager.prototype.resolve = function () {
|
||||
var resolved = function () {
|
||||
this.prune();
|
||||
// If there is an error while pruning (conflict, abort installation)
|
||||
if (!this.prune()) return this.emit('resolve');
|
||||
this.on('install', this.emit.bind(this, 'resolve'));
|
||||
this.install();
|
||||
}.bind(this);
|
||||
@@ -142,8 +143,9 @@ Manager.prototype.prune = function () {
|
||||
this.dependencies = prune(this.getDeepDependencies());
|
||||
} catch (err) {
|
||||
this.emit('error', err);
|
||||
return false;
|
||||
}
|
||||
return this;
|
||||
return true;
|
||||
};
|
||||
|
||||
Manager.prototype.install = function () {
|
||||
|
||||
Reference in New Issue
Block a user