From 44c1a8638d651a55e558ca9d97cd2222a367eeac Mon Sep 17 00:00:00 2001 From: Disassembler Date: Thu, 19 Mar 2020 10:48:24 +0100 Subject: [PATCH] Return cmd returncode from spoc-c exec --- usr/bin/spoc-container | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)