From d7dd6a2097b75533f34109ddc4a49803bb777a8e Mon Sep 17 00:00:00 2001 From: Austin Bozowski Date: Thu, 26 May 2022 07:41:13 +0000 Subject: [PATCH] More elegant CI fail --- examples/chef/chef.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/chef/chef.py b/examples/chef/chef.py index 400511315f1b08..773af840da5c9f 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -199,7 +199,11 @@ def main(argv: Sequence[str]) -> None: cached_manifest = json.loads(ci_manifest_file.read()) for device in ci_manifest: if device != "zap_commit": - if cached_manifest[device] != ci_manifest[device]: + try: + if cached_manifest[device] != ci_manifest[device]: + print("Cached files out of date. Please run chef with the flag --generate_zzz and commit") + exit(1) + except KeyError: print("Cached files out of date. Please run chef with the flag --generate_zzz and commit") exit(1) if device == "zap_commit" and False: