summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test_z_cmdline.py2
-rw-r--r--tox/_cmdline.py10
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_z_cmdline.py b/tests/test_z_cmdline.py
index 283c993..57aba64 100644
--- a/tests/test_z_cmdline.py
+++ b/tests/test_z_cmdline.py
@@ -200,7 +200,7 @@ def test_run_custom_install_command_error(cmd, initproj):
})
result = cmd.run("tox")
result.stdout.fnmatch_lines([
- "ERROR: invocation failed, args: ['*/tox.ini*",
+ "ERROR: invocation failed (errno 13), args: ['*/tox.ini*",
])
assert result.ret
diff --git a/tox/_cmdline.py b/tox/_cmdline.py
index aed71ec..0df2f17 100644
--- a/tox/_cmdline.py
+++ b/tox/_cmdline.py
@@ -95,9 +95,9 @@ class Action(object):
try:
popen = self._popen(args, cwd, env=env,
stdout=f, stderr=STDOUT)
- except OSError:
- self.report.error("invocation failed, args: %s, cwd: %s" %
- (args, cwd))
+ except OSError as e:
+ self.report.error("invocation failed (errno %d), args: %s, cwd: %s" %
+ (e.errno, args, cwd))
raise
popen.outpath = outpath
popen.args = [str(x) for x in args]
@@ -118,8 +118,8 @@ class Action(object):
if ret:
invoked = " ".join(map(str, popen.args))
if outpath:
- self.report.error("invocation failed, logfile: %s" %
- outpath)
+ self.report.error("invocation failed (exit code %d), logfile: %s" %
+ (ret, outpath))
out = outpath.read()
self.report.error(out)
if hasattr(self, "commandlog"):