@@ -100,24 +100,24 @@ const getNormalizedCommands = (commands?: CommandsInput): Command[] => {
100100 if ( Array . isArray ( commands ) ) {
101101 return commands . map ( command => ( {
102102 ...command ,
103- handler : toVoidReturning ( command . handler ) ,
103+ handler : ignoreReturn ( command . handler ) ,
104104 options : getNormalizedOptions ( command . options ) ,
105105 } ) ) ;
106106 }
107107
108108 return Object . entries ( commands ) . map ( ( [ name , command ] ) => ( {
109109 name,
110110 ...( typeof command === 'function'
111- ? { handler : toVoidReturning ( command ) , options : [ ] }
111+ ? { handler : ignoreReturn ( command ) , options : [ ] }
112112 : {
113113 ...command ,
114- handler : toVoidReturning ( command . handler ) ,
114+ handler : ignoreReturn ( command . handler ) ,
115115 options : getNormalizedOptions ( command . options ) ,
116116 } ) ,
117117 } ) ) ;
118118} ;
119119
120- const toVoidReturning =
120+ const ignoreReturn =
121121 func =>
122122 ( ...args ) => {
123123 const result = func ( ...args ) ;
@@ -134,7 +134,7 @@ export default (configInput: ConfigInput = {}) => {
134134 commands : getNormalizedCommands ( configInput . commands ) ,
135135 options : getNormalizedOptions ( configInput . options ) ,
136136 ...( configInput . action && {
137- action : toVoidReturning ( configInput . action ) ,
137+ action : ignoreReturn ( configInput . action ) ,
138138 } ) ,
139139 } ,
140140 { allowUnknownOption : false } ,
0 commit comments