Commit 4e698184 by Michael DeHaan

Merge pull request #895 from lorin/pip-fail

Return both stdout and stderr on pip failures.
parents fe923b93 8af3403f
...@@ -178,7 +178,13 @@ def main(): ...@@ -178,7 +178,13 @@ def main():
err += err_pip err += err_pip
if rc != 0: if rc != 0:
module.fail_json(msg=err, cmd=cmd) if not out:
msg = err
elif not err:
msg = out
else:
msg = "stdout: %s\n:stderr: %s" % (out, err)
module.fail_json(msg=msg, cmd=cmd)
module.exit_json(changed=changed, cmd=cmd, name=name, version=version, module.exit_json(changed=changed, cmd=cmd, name=name, version=version,
state=state, requirements=requirements, virtualenv=env) state=state, requirements=requirements, virtualenv=env)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment