File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -194,9 +194,12 @@ async function execute(rawArgs: string[]): Promise<void> {
194
194
await cli . error ( '🌶️ Provide values for the following parameters:' ) ;
195
195
196
196
for ( const error of result . error . errors ) {
197
- const optionInfo = cli . commandToExecute ! . options . find ( o => o . name === error . path . join ( '.' ) ) ;
197
+ const optionName = error . path . join ( '.' ) ;
198
+ const optionInfo = cli . commandToExecute . options . find ( o => o . name === optionName ) ;
198
199
const answer = await cli . promptForValue ( optionInfo ! ) ;
199
- cli . optionsFromArgs ! . options [ error . path . join ( '.' ) ] = answer ;
200
+ // coerce the answer to the correct type
201
+ const parsed = getCommandOptionsFromArgs ( [ `--${ optionName } ` , answer ] , cli . commandToExecute ) ;
202
+ cli . optionsFromArgs . options [ optionName ] = parsed [ optionName ] ;
200
203
}
201
204
}
202
205
else {
You can’t perform that action at this time.
0 commit comments