Skip to content

Commit

Permalink
Repair error messaging in deployer.
Browse files Browse the repository at this point in the history
  • Loading branch information
nporteschaikin committed Oct 23, 2014
1 parent b3141fa commit c5556c0
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions lib/deployer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ Deployer.prototype = {
start: function () {
return this.compile()
.with(this)
.then(this.deploy)
.then(this.confirm);
.then(this.deploy);
},

compile: function () {
Expand All @@ -29,14 +28,8 @@ Deployer.prototype = {

deploy: function (theme) {
if (!theme) throw new Error(this.options.index + ' is not a valid theme.');
return this.tumblr.update_theme(theme);
},

confirm: function (response) {
if (response.statusCode != 200)
throw new Error('Please verify your credentials are correct by signing into Tumblr via their web site.');

this.emitter.emit('finish', 'deploy to ' + this.options.blog);
return this.tumblr.update_theme(theme)
.then(this.emitter.emit.bind(this.emitter, 'finish', 'deploying ' + this.options.blog))
}

}
Expand Down

0 comments on commit c5556c0

Please sign in to comment.