File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,6 @@ class BaseSubCommand {
197197 ...rc ,
198198 ...uniOptions
199199 } ) ;
200-
201200 const globalPrompts = globalOptionsPrompts . filter (
202201 prompt => this . validatorDesc [ prompt . name ] ?. required && ! options [ prompt . name ]
203202 ) ;
@@ -223,11 +222,15 @@ class BaseSubCommand {
223222 }
224223 const subOptionsLength = Object . keys ( subCommandOptions ) . length ;
225224 if ( subOptionsLength < this . parameters . length ) {
226- const response = BaseSubCommand . normalizeConfig ( await inquirer . prompt ( this . parameters . slice ( subOptionsLength ) ) ) ;
227- subCommandOptions = {
228- ...subCommandOptions ,
229- ...response
230- } ;
225+ try {
226+ const response = BaseSubCommand . normalizeConfig ( await inquirer . prompt ( this . parameters . slice ( subOptionsLength ) ) ) ;
227+ subCommandOptions = {
228+ ...subCommandOptions ,
229+ ...response
230+ } ;
231+ } catch ( e ) {
232+ console . error ( e ) ;
233+ }
231234 }
232235 return {
233236 localOptions,
Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ const loadCommandParameters = [
261261 inactive : 'no' ,
262262 suffix : '?' ,
263263 when ( answers ) {
264- return answers [ 'private-key' ] . trim ( ) . split ( ' ' ) . length > 1 ;
264+ return answers [ 'private-key' ] ? .trim ( ) . split ( ' ' ) . length > 1 ;
265265 }
266266 } ,
267267 {
You can’t perform that action at this time.
0 commit comments