Skip to content

SOPS cannot handle multi-line .env files #965

Open
@karlschriek

Description

@karlschriek

The parser that SOPS uses seems to have a different interpretation of what constitutes a dotenv file from what how bash views is. This relates in particular to encrypting/decrypt dotenvs that have multiline environement variables.

However, SOPS is not able to handle encrypting this file. Calling sops -e --pgp xxxxxxxx my-vars.env will produce the following error:

Error unmarshalling file: invalid dotenv input line: some values

The parser is trying to interpret the second line of BAR (which is "some values") as another key-value pair, which does not work.

This is a pretty major inconsistency.

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