diff --git a/src/tox/venv.py b/src/tox/venv.py index 26804f590..baccdee14 100755 --- a/src/tox/venv.py +++ b/src/tox/venv.py @@ -1,6 +1,7 @@ import ast import codecs import os +import pipes import re import sys @@ -361,7 +362,9 @@ def test(self, redirect=False): for i, argv in enumerate(self.envconfig.commands): # have to make strings as _pcall changes argv[0] to a local() # happens if the same environment is invoked twice - message = "commands[{}] | {}".format(i, " ".join([str(x) for x in argv])) + message = "commands[{}] | {}".format( + i, " ".join([pipes.quote(str(x)) for x in argv]) + ) action.setactivity("runtests", message) # check to see if we need to ignore the return code # if so, we need to alter the command line arguments