Return cmd returncode from spoc-c exec
This commit is contained in:
parent
fc42131bb6
commit
44c1a8638d
@ -4,6 +4,7 @@
|
||||
import argparse
|
||||
import os
|
||||
import shlex
|
||||
import sys
|
||||
|
||||
from spoc import repo_local
|
||||
from spoc.config import VOLUMES_DIR
|
||||
@ -96,7 +97,9 @@ def status(container_name):
|
||||
|
||||
def execute(container_name, command, uid, gid):
|
||||
# Execute a command in container's namespace
|
||||
Container(container_name).execute(command, uid, gid)
|
||||
result = Container(container_name).execute(command, uid, gid)
|
||||
# Set returncode to that of the command
|
||||
sys.exit(result.returncode)
|
||||
|
||||
parser = argparse.ArgumentParser(description='SPOC container manager')
|
||||
parser.set_defaults(action=None)
|
||||
|
Loading…
Reference in New Issue
Block a user