Skip to content

Commit 9af098f

Browse files
authored
fix: correct a polynomial regex (npm#39)
1 parent de7d7dc commit 9af098f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/env-replace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// replace any ${ENV} values with the appropriate environ.
22

3-
const envExpr = /(\\*)\$\{([^}]+)\}/g
3+
const envExpr = /(?<!\\)(\\*)\$\{([^${}]+)\}/g
44

55
module.exports = (f, env) => f.replace(envExpr, (orig, esc, name) => {
66
const val = env[name] !== undefined ? env[name] : `$\{${name}}`

0 commit comments

Comments
 (0)