We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51af1e1 commit 8a8bc72Copy full SHA for 8a8bc72
lib/webpack-cli.js
@@ -165,10 +165,11 @@ class WebpackCLI extends GroupHelper {
165
runHelp(args) {
166
const HelpGroup = require('./groups/help');
167
const Commands = require('./utils/commands').names;
168
- let command = null;
169
- args.forEach(arg => {
170
- if (Commands.includes(arg)) command = arg;
171
- });
+ const command = Object.keys(Commands).map( i => {
+ if (args.includes(Commands[i])) {
+ return Commands[i];
+ }
172
+ })[0];
173
return new HelpGroup().outputHelp(command);
174
}
175
0 commit comments