Skip to content

node env file parsing supports keys compared to dotenv #58807

Open
@dario-piotrowicz

Description

@dario-piotrowicz

After some testing I noticed that node.js (--env-file and related) parses keys in env files differently than dotenv

Specifically dotenv doesn't support keys with spaces or special characters while node does

You can see what I tried in the screenshot below:
different keys being run with both node,js and dotenv parsing

So I would love to understand if the current node.js behavior is the desired one, or if node should align with dotenv.

PS: dot env doesn't seem to document in details what keys syntax it supports, also in the dotenv repo's tests I could not really find any test around keys 😕

Metadata

Metadata

Assignees

No one assigned

    Labels

    dotenvIssues and PRs related to .env file parsing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions