Skip to content

Commit c92e33f

Browse files
adamluikudo-sync-bot
authored andcommitted
Strictened argRegex.paramOptions.comment so invalid arg err reflects correct valid arg ↞ [auto-sync from adamlui/minify.js]
1 parent b400af4 commit c92e33f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

minify.js/node.js/src/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const argRegex = {
2222
'noMangle': /^--?(?:M|(?:disable|no)-?mangle|mangle=(?:false|0))$/,
2323
'quietMode': /^--?q(?:uiet)?(?:-?mode)?$/
2424
},
25-
paramOptions: { 'comment': /^--?comments?/ },
25+
paramOptions: { 'comment': /^--?comments?(?:=.*|$)/ },
2626
infoCmds: {
2727
'help': /^--?h(?:elp)?$/,
2828
'version': /^--?ve?r?s?i?o?n?$/

0 commit comments

Comments
 (0)