Skip to content

Commit 77b7da5

Browse files
refactor: remove duplicate cli-flags definition (#1873)
1 parent e250b63 commit 77b7da5

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

packages/info/src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import envinfo from 'envinfo';
22
import logger from 'webpack-cli/lib/utils/logger';
3-
import options from './options';
3+
import { commands } from 'webpack-cli/lib/utils/cli-flags';
44
import WebpackCLI from 'webpack-cli';
55

66
interface Information {
@@ -32,7 +32,8 @@ const DEFAULT_DETAILS: Information = {
3232

3333
export default async function info(...args): Promise<string[]> {
3434
const cli = new WebpackCLI();
35-
const parsedArgs = cli.argParser(options, args, true);
35+
const { flags: infoFlags } = commands.find((cmd) => cmd.name === 'info');
36+
const parsedArgs = cli.argParser(infoFlags, args, true);
3637
const infoArgs = parsedArgs.opts;
3738
const envinfoConfig = {};
3839

packages/info/src/options.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)