deno
ea9214cb - fix: handle inner quotes in double-quoted env values in .env file (#32930)

Commit
217 days ago
fix: handle inner quotes in double-quoted env values in .env file (#32930) ## Summary - Fix `--env-file` parsing of double-quoted values containing inner (unescaped) quotes, e.g. `KEY="foo'bar"baz`qux"` - Fix `\n` escape expansion in double-quoted values with inner quotes, e.g. `KEY="foo\ni am "on" newline"` **Root cause**: `find_char` found the first matching `"` after the opening quote, which was an inner quote — truncating the value. The dotenv npm package instead treats the outermost quotes as delimiters. **Fix**: New `find_closing_quote` function tries the nearest matching quote first. If there's non-whitespace content after it on the same line, inner quotes are present — it falls back to the last matching quote on the line instead. Closes #32928 --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Parents
Loading