Skip to content

Commit

Permalink
If TOX_WORK_DIR is indicated in the environment, honor it. Closes tox…
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 15, 2020
1 parent 23dd96f commit 40328c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tox/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,8 @@ def line_of_default_to_zero(section, name=None):
reader.addsubstitutions(toxinidir=config.toxinidir, homedir=config.homedir)

if config.option.workdir is None:
config.toxworkdir = reader.getpath("toxworkdir", "{toxinidir}/.tox")
default = os.environ.get('TOX_WORK_DIR', "{toxinidir}/.tox")
config.toxworkdir = reader.getpath("toxworkdir", default)
else:
config.toxworkdir = config.toxinidir.join(config.option.workdir, abs=True)

Expand Down

0 comments on commit 40328c4

Please sign in to comment.