Skip to content

Substitution does not happen for loading env.vars from file in setenv #2285

@dalito

Description

@dalito

I had the following in tox.ini

# reading local configuration from config/.env
setenv = 
    ZZZ = {toxinidir}
    file|{toxinidir}/config/.env

and was expecting that {toxinidir} is replaced by the actual directory like it is for the environment variable ZZZ.

However, no replacement occurs and since the file is only loaded when the path is valid, nothing is read from config\.env. Moreover, no error is raised to point out the problem in tox.ini. The loading-from-file option was added in #1668.

Details on my system: tox 3.24.4, Python 3.9.9-amd64, Win10Pro

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug:normalaffects many people or has quite an impact

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions