Skip to content
Myr

Changed `Command#confirm()` retry until input is given

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent e397d27 · Browse files · 1 file+4 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−0 removed

  • other:+4 added−0 removed

1 file+4 added−0 removed

modified:lib/commander.js+4 added
732 unmodified lines
733 */734735736Command.prototype.confirm = function(str, fn){737 var self = this;738 this.prompt(str, function(ok){739 if (!ok.trim()) {740 return self.confirm(str, fn);741 }742 fn(parseBool(ok));743 });744};745
64 unmodified lines