Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Commit

Permalink
fix: correct a polynomial regex (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf authored Feb 14, 2022
1 parent de7d7dc commit 9af098f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/env-replace.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// replace any ${ENV} values with the appropriate environ.

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

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

0 comments on commit 9af098f

Please sign in to comment.