Hidden dependency on $HOME

Issue #105 on hold
Barry Warsaw
created an issue

tox appears to have a hidden dependency on a valid $HOME, but in some environments this is not the case. For example, when building the package for Ubuntu, the build environment deliberately sets $HOME to /sbuild-nonexistent. You can reproduce this with hg head by doing:

$ HOME=/sbuild-nonexistent tox

Traceback (most recent call last):
  File "/usr/bin/tox", line 9, in <module>
    load_entry_point('tox==1.4.2', 'console_scripts', 'tox')()
  File "/usr/lib/python2.7/dist-packages/tox/_cmdline.py", line 25, in main
    retcode = Session(config).runcommand()
  File "/usr/lib/python2.7/dist-packages/tox/_cmdline.py", line 273, in runcommand
    return self.subcommand_test()
  File "/usr/lib/python2.7/dist-packages/tox/_cmdline.py", line 353, in subcommand_test
    sdist_path = self.sdist()
  File "/usr/lib/python2.7/dist-packages/tox/_cmdline.py", line 348, in sdist
  File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 424, in ensure
    return p._ensuredirs()
  File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 406, in _ensuredirs
  File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 406, in _ensuredirs
  File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 409, in _ensuredirs
  File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 381, in mkdir
    py.error.checked_call(os.mkdir, str(p))
  File "/usr/lib/python2.7/dist-packages/py/_error.py", line 84, in checked_call
    raise cls("%s%r" % (func.__name__, args))
py.error.EACCES: [Permission denied]: mkdir('/sbuild-nonexistent',)

Comments (5)

  1. Log in to comment