Skip to content

dotenv silently fails to read a string variable if it is not enclosed in quotes in .env file #38

Open
@rubyfin

Description

@rubyfin

If I have a string variable in a .env file like this, then it won't find it and will just ignore it:

PORT=5000
NICE_NAME=My Service

But if I add quotes to the string, then everything is fine:

PORT=5000
NICE_NAME="My Service"

I understand the rationale, but I think it would be better to display an error / warning message, instead of silently dropping the offending variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions