Mismatch now has its custom template.

This commit is contained in:
André Cruz
2012-11-19 00:39:08 +00:00
parent 3b1642a52f
commit 41e6f0bdbc
2 changed files with 3 additions and 3 deletions

View File

@@ -272,9 +272,7 @@ Package.prototype.loadJSON = function () {
if (this.tag && (cleanedTag = semver.clean(this.tag)) && cleanedTag !== this.version) {
// Only print the warning once
if (!this.unitWork.retrieve('mismatch#' + this.name + '_' + cleanedTag)) {
template('warn', { message: 'The version specified in the ' + config.json + ' of package ' + this.name + ' mismatches the tag (' + cleanedTag + ' vs ' + (this.version || 'N/A') + ')' })
.on('data', this.emit.bind(this, 'data'));
template('warn', { message: 'Bower will assume the tag ' + cleanedTag + ', but you should report this problem to the package author' })
template('warning-mismatch', { name: this.name, json: config.json, tag: cleanedTag, version: this.version || 'N/A' })
.on('data', this.emit.bind(this, 'data'));
this.unitWork.store('mismatch#' + this.name + '_' + cleanedTag, true);
}

View File

@@ -0,0 +1,2 @@
{{#yellow}}mismatch{{/yellow}} {{#grey}}The version specified in the{{/grey}} {{json}} {{#grey}}of package {{/grey}}{{name}} {{#grey}}mismatches the tag ({{/grey}}{{#red}}{{tag}}{{/red}} {{#grey}}vs{{/grey}} {{#red}}{{version}}{{/red}}{{#grey}}){{/grey}}
{{#yellow}}mismatch{{/yellow}} {{#grey}}You should report this problem to the package author{{/grey}}