Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tox >=2.0 fails with & in path #252

pytoxbot opened this issue Sep 17, 2016 · 2 comments

tox >=2.0 fails with & in path #252

pytoxbot opened this issue Sep 17, 2016 · 2 comments


Copy link

Starting with tox 2.0, tox fails when trying to launch commands with path containing & :


$ /var/lib/jenkins/shiningpanda/jobs/3d4c850b/tools/bin/python -c "import tox; tox.cmdline();" -c tox.ini -e py27
GLOB sdist-make: /opt/jenkins/workspace/ocs.conf/TOXENV/py27/label_exp/armhf&&python/
py27 create: /opt/jenkins/workspace/ocs.conf/TOXENV/py27/label_exp/armhf&&python/.tox/py27
py27 installdeps: nose, coverage, pylint, pep8
py27 inst: /opt/jenkins/workspace/ocs.conf/TOXENV/py27/label_exp/armhf&&python/.tox/dist/
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/var/lib/jenkins/shiningpanda/jobs/3d4c850b/tools/local/lib/python2.7/site-packages/tox/", line 39, in main
    retcode = Session(config).runcommand()
  File "/var/lib/jenkins/shiningpanda/jobs/3d4c850b/tools/local/lib/python2.7/site-packages/tox/", line 367, in runcommand
    return self.subcommand_test()
  File "/var/lib/jenkins/shiningpanda/jobs/3d4c850b/tools/local/lib/python2.7/site-packages/tox/", line 534, in subcommand_test
    output = py.process.cmdexec("%s freeze" % (pip))
  File "/var/lib/jenkins/shiningpanda/jobs/3d4c850b/tools/local/lib/python2.7/site-packages/py/_process/", line 28, in cmdexec
    raise ExecutionFailed(status, status, cmd, out, err)
py.process.cmdexec.Error: ExecutionFailed: 127  /opt/jenkins/workspace/ocs.conf/TOXENV/py27/label_exp/armhf&&python/.tox/py27/bin/pip freeze
/bin/sh: 1: /opt/jenkins/workspace/ocs.conf/TOXENV/py27/label_exp/armhf: not found

While this is imho a problem with py/pytest not taking care of escaping strings passed to shell it is a problem specifically happening with tox >=2.0.

We need this to work for supporting label expressions in jenkins jobs and the jenkins tox plugin does not allow restricting the version it uses.

Copy link

Original comment by @hpk42

fix issue252: allow environment names with special characters.
Thanks Julien Castets for initial PR and patience.

→ <>

Copy link

Original comment by jcastets

This should actually solve the issue:

@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
None yet

No branches or pull requests

1 participant