Skip to content

Conflicting options: 'override' and 'cascade' #89

@llovett2

Description

@llovett2

The override option introduced in #87 by @jfairley conflicts with the cascade option when both are used together.

Example

.env

MY_NAME=Bob

.env.local

MY_NAME=Joe

Command

> dotenv -c -- bash -c 'echo $MY_NAME'
Joe
> dotenv -co -- bash -c 'echo $MY_NAME'
Bob

I would expect Joe from .env.local to override Bob from .env based on how cascade works, but when the override option is present Bob prevails because .env is processed last (see here and here).

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