diff options
author | Chris Down <chris@chrisdown.name> | 2022-01-13 07:40:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-13 07:40:56 +0000 |
commit | 9cc692d85c9ce84344ea7fee4b127755c6099a32 (patch) | |
tree | eb758db9008ecfc5d2e9b487df784efa892fec0a /src/tox/venv.py | |
parent | 86a0383c0617ff1d1ea47a526211bedc415c9d95 (diff) | |
download | tox-git-master.tar.gz |
venv: Do not fail for test commands that don't exist with "-" leader (#2316)master
Diffstat (limited to 'src/tox/venv.py')
-rw-r--r-- | src/tox/venv.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/tox/venv.py b/src/tox/venv.py index cdd6949a..87e01656 100644 --- a/src/tox/venv.py +++ b/src/tox/venv.py @@ -595,7 +595,17 @@ class VirtualEnv(object): reporter.verbosity2("setting PATH={}".format(env["PATH"])) # get command - args[0] = self.getcommandpath(args[0], venv, cwd) + try: + args[0] = self.getcommandpath(args[0], venv, cwd) + except tox.exception.InvocationError: + if ignore_ret: + self.status = getattr(self, "status", 0) + msg = "command not found but explicitly ignored" + reporter.warning("{}\ncmd: {}".format(msg, args[0])) + return "" # in case it's returnout + else: + raise + if sys.platform != "win32" and "TOX_LIMITED_SHEBANG" in os.environ: args = prepend_shebang_interpreter(args) |