Skip to content

Hidden dependency on $HOME #105

@pytoxbot

Description

@pytoxbot

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:

#!python


$ 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
    sdistfile.dirpath().ensure(dir=1)
  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
    parent._ensuredirs()
  File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 406, in _ensuredirs
    parent._ensuredirs()
  File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 409, in _ensuredirs
    self.mkdir()
  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',)

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