@@ -479,7 +479,10 @@ class WebpackCLI implements IWebpackCLI {
479
479
} ) as WebpackCLICommand ;
480
480
481
481
if ( commandOptions . description ) {
482
- command . description ( commandOptions . description , commandOptions . argsDescription ) ;
482
+ command . description (
483
+ commandOptions . description ,
484
+ commandOptions . argsDescription as { [ argName : string ] : string } ,
485
+ ) ;
483
486
}
484
487
485
488
if ( commandOptions . usage ) {
@@ -1292,6 +1295,9 @@ class WebpackCLI implements IWebpackCLI {
1292
1295
"Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands." ,
1293
1296
) ;
1294
1297
1298
+ // webpack-cli has it's own logic for showing suggestions
1299
+ this . program . showSuggestionAfterError ( false ) ;
1300
+
1295
1301
const outputHelp = async (
1296
1302
options : string [ ] ,
1297
1303
isVerbose : boolean ,
@@ -1335,7 +1341,7 @@ class WebpackCLI implements IWebpackCLI {
1335
1341
// Support multiple aliases
1336
1342
subcommandTerm : ( command : WebpackCLICommand ) => {
1337
1343
const humanReadableArgumentName = ( argument : WebpackCLICommandOption ) => {
1338
- const nameOutput = argument . name + ( argument . variadic === true ? "..." : "" ) ;
1344
+ const nameOutput = argument . name ( ) + ( argument . variadic === true ? "..." : "" ) ;
1339
1345
1340
1346
return argument . required ? "<" + nameOutput + ">" : "[" + nameOutput + "]" ;
1341
1347
} ;
@@ -1412,7 +1418,7 @@ class WebpackCLI implements IWebpackCLI {
1412
1418
// Arguments
1413
1419
const argumentList = helper
1414
1420
. visibleArguments ( command )
1415
- . map ( ( argument ) => formatItem ( argument . term , argument . description ) ) ;
1421
+ . map ( ( argument ) => formatItem ( argument . name ( ) , argument . description ) ) ;
1416
1422
1417
1423
if ( argumentList . length > 0 ) {
1418
1424
output = output . concat ( [ bold ( "Arguments:" ) , formatList ( argumentList ) , "" ] ) ;
0 commit comments