Skip to content

Configuration files not working with envname #890

@r1viollet

Description

@r1viollet

Description

Configuration files are handled as an option, however the envname setting does not work with them.

  app.set_config("--config")->envname("MY_CONFIG_FILE");

Additional information

Indeed the order in which we consider options shows that we consider files before environment variables. Hence the environment variable can not be taken into account.

Possible workaround

I made a workaround where I set default value of the config file, to the environment variable's value.

Expected behaviour

Make it impossible to add an environment variable to prevent confusion, or read the environment variable when we create the option in the set_config flow.

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