Commit a812167d authored by Darko Poljak's avatar Darko Poljak

Exit with libexec command return code

parent 7dddcb79
Pipeline #515 passed with stage
in 49 seconds
......@@ -2,6 +2,7 @@ import os
import os.path
import cdist.argparse
import subprocess
import sys
libexec_delimiter = '-'
......@@ -38,4 +39,7 @@ def run(name, argv):
lib_path = os.path.join(libexec_path, lib_name)
args = [lib_path, ]
args.extend(argv)
subprocess.check_call(args)
try:
subprocess.check_call(args)
except subprocess.CalledProcessError as e:
sys.exit(e.returncode)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment