From 7d00b4a5b14c31200044e1540acab02952feeb4c Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 20 Jul 2018 18:29:20 -0700 Subject: [PATCH] Don't truncate sh produced logs By default an uncaught sh exception is nicely formated and printed. This is great except that it also truncates stdout and stderr. If you rtfs you discover that you can override this behavior by setting the _truncate_exc flag on commands to False. Do this so that we can get complete process output for debugging. Change-Id: Ibae19ac891ad7978a5bd128626adaa35a1c354e6 --- pbrx/container_images.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pbrx/container_images.py b/pbrx/container_images.py index 5ce98a5..a8b30e7 100755 --- a/pbrx/container_images.py +++ b/pbrx/container_images.py @@ -62,7 +62,8 @@ class ContainerContext(object): host=os.path.expanduser('~/.config/pip/pip.conf'), guest='/root/.config/pip/pip.conf')) self.run_id = self.create() - self._cont = sh.docker.bake("exec", self.run_id, "sh", "-c") + self._cont = sh.docker.bake("exec", self.run_id, "sh", "-c", + _truncate_exc=False) def create(self): vargs = [