diff --git a/examples/chef/chef.py b/examples/chef/chef.py index 562bdfd1f6b03b..5f241497bb9be8 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -24,6 +24,7 @@ import hashlib import json import tarfile +import subprocess import constants import stateful_shell @@ -272,7 +273,7 @@ def main(argv: Sequence[str]) -> None: if device_dir_item.endswith(target_file_ext) and device_dir_item in chef_util.ci_allowlist: device_name = device_dir_item[:-len(target_file_ext)] command = './chef.py -cbr --use_zzz -d {} -t {}'.format(device_name, options.build_target) - shell.run_cmd(command) + subprocess.check_call(command, cwd=_CHEF_SCRIPT_PATH, shell=True) exit(0) # @@ -291,7 +292,7 @@ def main(argv: Sequence[str]) -> None: output_dir = os.path.join(_CHEF_SCRIPT_PATH, directory) command = './chef.py -czbr -d {} -t {}'.format(device_name, platform) print(f"Building {command}") - shell.run_cmd(command) + subprocess.check_call(command, cwd=_CHEF_SCRIPT_PATH, shell=True) archive_prefix = "/workspace/artifacts/" if not os.path.exists(archive_prefix): os.mkdir(archive_prefix)