Skip to content

An empty value ignores ${name:-default} #715

Description

@SashaMIT

${name:-default} is the POSIX form that uses the default when name is unset or empty. An empty value is returned as itself.

dotenv.dotenv_values(stream=io.StringIO("b=\na=${b:-d}"))
# {'b': '', 'a': ''}

a should be d. A missing b already becomes d. b=c still stays c. ${b} with no default stays empty.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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