mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
Fix detection of unsuitable resolutions.
This commit is contained in:
@@ -590,21 +590,21 @@ Manager.prototype._electSuitable = function (name, semvers, nonSemvers) {
|
||||
});
|
||||
}
|
||||
|
||||
if (!suitable) {
|
||||
this._logger.conflict('warn', 'Unsuitable resolution for ' + name + ': ' + resolution, {
|
||||
if (suitable === -1) {
|
||||
this._logger.warn('resolution', 'Unsuitable resolution declared for ' + name + ': ' + resolution, {
|
||||
name: name,
|
||||
picks: dataPicks,
|
||||
resolution: resolution
|
||||
});
|
||||
} else {
|
||||
this._logger.conflict('solved', 'Unable to find suitable version for ' + name, {
|
||||
name: name,
|
||||
picks: dataPicks,
|
||||
resolution: resolution,
|
||||
suitable: dataPicks[suitable]
|
||||
});
|
||||
return Q.resolve(picks[suitable]);
|
||||
}
|
||||
|
||||
this._logger.conflict('solved', 'Unable to find suitable version for ' + name, {
|
||||
name: name,
|
||||
picks: dataPicks,
|
||||
resolution: resolution,
|
||||
suitable: dataPicks[suitable]
|
||||
});
|
||||
return Q.resolve(picks[suitable]);
|
||||
}
|
||||
|
||||
// If interactive is disabled, error out
|
||||
@@ -636,7 +636,7 @@ Manager.prototype._electSuitable = function (name, semvers, nonSemvers) {
|
||||
}
|
||||
|
||||
if (this._saveResolutions) {
|
||||
this._logger.info('resolution', 'Saved ' + name + '#' + resolution + ' as the resolution', {
|
||||
this._logger.info('resolution', 'Saved ' + name + '#' + resolution + ' as resolution', {
|
||||
package: name,
|
||||
resolution: resolution,
|
||||
action: this._resolutions[name] ? 'edit' : 'add'
|
||||
|
||||
Reference in New Issue
Block a user