From fea75faec052f097f8b6041b661f96da049525a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Wed, 23 Jan 2019 00:00:00 +0000 Subject: [PATCH] run-docker: don't raise if sh exit status != 0, forward to host instead --- run-docker | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/run-docker b/run-docker index df3cfda..0a1d9a1 100755 --- a/run-docker +++ b/run-docker @@ -2,6 +2,7 @@ import argparse import os +import sys import common import shell_helpers @@ -41,11 +42,13 @@ def sh_func(args): sh_args = args else: sh_args = ['bash'] - sh.run_cmd( + exit_status = sh.run_cmd( docker + ['exec', '-i', '-t', container_name] + sh_args + [LF], + raise_on_failure=False ) + sys.exit(exit_status) def start(args): sh.run_cmd(docker + ['start', container_name, LF]) def stop(args):