run-docker: don't raise if sh exit status != 0, forward to host instead

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-01-23 00:00:00 +00:00
parent 0afee1d2da
commit fea75faec0

View File

@@ -2,6 +2,7 @@
import argparse import argparse
import os import os
import sys
import common import common
import shell_helpers import shell_helpers
@@ -41,11 +42,13 @@ def sh_func(args):
sh_args = args sh_args = args
else: else:
sh_args = ['bash'] sh_args = ['bash']
sh.run_cmd( exit_status = sh.run_cmd(
docker + ['exec', '-i', '-t', container_name] + docker + ['exec', '-i', '-t', container_name] +
sh_args + sh_args +
[LF], [LF],
raise_on_failure=False
) )
sys.exit(exit_status)
def start(args): def start(args):
sh.run_cmd(docker + ['start', container_name, LF]) sh.run_cmd(docker + ['start', container_name, LF])
def stop(args): def stop(args):