Skip to content

SOPS doesn't interact well with dotenv inline comments #1271

@johnmatthiggins

Description

@johnmatthiggins

Say I have a dotenv file with the contents seen below:

ID="123#567"

I need the quotes to ensure that the javascript dotenv library can parse the field correctly. Without the quotes the value of the variable will become just "123" because the hash will be regarded as the start of a comment which will stop the parser from reading the rest of the value.

SOPS currently doesn't respect the quotes in my dotenv file. It strips them when encrypting then creates this file when decrypting which breaks dotenv:

ID=123#567

Would it be possible to wrap every value with a hash inside of it in quotes when decrypting a dotenv file?

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