Skip to content

How can I set a default value for missing environment variables? #491

@brianbruggeman

Description

@brianbruggeman

Also here: https://stackoverflow.com/questions/42982267/tox-set-default-values-for-missing-environment-variables

I've found that I would really like to use environment variables to control flow - especially when testing. But I also would like to set a default behavior based on whether or not an environment variable is present. In bash, I'd just use: ${ENV_VAR:-default_value}, but I don't have that basic option in Tox (unless I missed it).

Is there a way?

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