mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
run-docker: don't raise if sh exit status != 0, forward to host instead
This commit is contained in:
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user