File tree 1 file changed +4
-8
lines changed
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -223,24 +223,20 @@ Base.prototype.welcome = deprecate(
223
223
* user's answers as defaults.
224
224
*
225
225
* @param {array } questions Array of question descriptor objects. See {@link https://github.com/SBoudrias/Inquirer.js/blob/master/README.md Documentation}
226
- * @param {Function } callback Receive a question object
227
- * @return {this }
226
+ * @return {Promise }
228
227
*/
229
228
230
- Base . prototype . prompt = function ( questions , callback ) {
229
+ Base . prototype . prompt = function ( questions ) {
231
230
questions = promptSuggestion . prefillQuestions ( this . _globalConfig , questions ) ;
232
231
233
- this . env . adapter . prompt ( questions , function ( answers ) {
232
+ return this . env . adapter . prompt ( questions ) . then ( function ( answers ) {
234
233
if ( ! this . options [ 'skip-cache' ] ) {
235
234
promptSuggestion . storeAnswers ( this . _globalConfig , questions , answers ) ;
236
235
}
237
236
238
- if ( _ . isFunction ( callback ) ) {
239
- callback ( answers ) ;
240
- }
237
+ return answers ;
241
238
} . bind ( this ) ) ;
242
239
243
- return this ;
244
240
} ;
245
241
246
242
/**
You can’t perform that action at this time.
0 commit comments