Skip to content

Commit bbf7688

Browse files
committed
fixup! util: use RegExp.escape to better escape debugEnv
1 parent 66e9dc8 commit bbf7688

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/util/debuglog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function initializeDebugEnv(debugEnv) {
3535
if (debugEnv) {
3636
// This is run before any user code, it's OK not to use primordials.
3737
debugEnv = RegExpEscape(debugEnv)
38-
.replaceAll(/(?<=[^\\]|^)\\\*/g, '[^.]*')
38+
.replaceAll(RegExpEscape('*'), '[^.]*')
3939
.replaceAll(RegExpEscape(','), '$|^');
4040
const debugEnvRegex = new RegExp(`^${debugEnv}$`, 'i');
4141
testEnabled = (str) => RegExpPrototypeExec(debugEnvRegex, str) !== null;

0 commit comments

Comments
 (0)