Skip to content

Commit

Permalink
Fixed prompt value handling (ref #213)
Browse files Browse the repository at this point in the history
  • Loading branch information
passy committed Apr 23, 2013
1 parent 3a69932 commit 627904f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/actions/prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ module.exports = function prompt(prompts, done) {
return done(err);
}

results[prompt.name] = value;
results[prompt.name] = value[prompt.name];
next(prompts.shift());
}

Expand Down
2 changes: 1 addition & 1 deletion lib/util/conflicter.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ conflicter._ask = function (filepath, content, cb) {
return cb(err);
}

var answer = result.overwrite.overwrite;
var answer = result.overwrite;

var ok = 'Yynaqdh'.split('').some(function (valid) {
return valid === answer;
Expand Down
2 changes: 1 addition & 1 deletion test/conflicter.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe('conflicter', function () {
describe('conflicter#_ask', function () {
var promptMock = {
prompt: function (config, cb) {
cb(this.err, { overwrite: { overwrite: this.answer } });
cb(this.err, { overwrite: this.answer });
},
err: null,
answer: null
Expand Down

0 comments on commit 627904f

Please sign in to comment.