Skip to content

Commit 9da9db4

Browse files
committed
chore(cli): fix helper to use includes for dashed flag stripping
1 parent c13f05b commit 9da9db4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/bootstrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require('./utils/process-log');
66

77
const isFlagPresent = (args, flag) => args.find(arg => [flag, `--${flag}`].includes(arg));
88
const isArgCommandName = (arg, cmd) => arg === cmd.name || arg === cmd.alias;
9-
const stripDashedFlags = (args, cmd) => args.filter(arg => ~arg.indexOf('--') && !isArgCommandName(arg, cmd));
9+
const stripDashedFlags = (args, cmd) => args.filter(arg => !arg.includes('--') && !isArgCommandName(arg, cmd));
1010
const normalizeFlags = (args, cmd) => {
1111
const slicedArgs = args.slice(2);
1212
if (cmd.name === 'serve') {

0 commit comments

Comments
 (0)