Skip to content
Myr

Added: append (yes or no) on confirmation

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 d660ff3 · Browse files · 1 file+3 added−2 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+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:lib/commander.js+3 added-2 removed
901 unmodified lines
902 * @api public903 */904905906Command.prototype.confirm = function(str, fn){906Command.prototype.confirm = function(str, fn, verbose){907 var self = this;908 this.prompt(str, function(ok){909 if (!ok.trim()) {910 if (!verbose) str += '(yes or no) ';910 return self.confirm(str, fn);911 return self.confirm(str, fn, true);912 }913 fn(parseBool(ok));914 });915};
111 unmodified lines