diff --git a/usr/bin/spoc-container b/usr/bin/spoc-container index d39a26a..b2153e1 100755 --- a/usr/bin/spoc-container +++ b/usr/bin/spoc-container @@ -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)