From 331473759aa9f5b4ea7e08fe3f91f33e54846b14 Mon Sep 17 00:00:00 2001 From: cpagravel Date: Mon, 13 Jun 2022 05:50:01 -0700 Subject: [PATCH] Chef - Fix: wrong order for clearing directory on zzap run (#19324) --- examples/chef/chef.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/chef/chef.py b/examples/chef/chef.py index 8b0e56a6145ba4..22d821d05083ac 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -461,8 +461,8 @@ def main(argv: Sequence[str]) -> None: if options.do_run_zap: flush_print("Running ZAP script to generate artifacts") - shell.run_cmd(f"mkdir -p {gen_dir}/") - shell.run_cmd(f"rm {gen_dir}/*") + shell.run_cmd(f"rm -rf {gen_dir}") + shell.run_cmd(f"mkdir -p {gen_dir}") shell.run_cmd( f"{_REPO_BASE_PATH}/scripts/tools/zap/generate.py {_CHEF_SCRIPT_PATH}/devices/{options.sample_device_type_name}.zap -o {gen_dir}") # af-gen-event.h is not generated