Skip to content

How should I store values with dollar signs ($)...(escaped, quoted)? #214

@timkelty

Description

@timkelty

I have a .env file that is being parsed by both PHP and node Node implementations.

I'm asking here in the canonical repo, as this is more of a best practice question.

I have values that have literal dollar signs in them:

DB_PASS=DgaH$a43

Should I be quoting that, or escaping the dollar?
If I escape the dollar in my .env file, will I need to unescape it when i use it?

So I guess it boils down to - should I be escaping the dollar in my .env file, or when I get the value with PHP or Node or whatever?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions