From d2d27ab36c36cb297e5d079af675c0a0f37a28aa Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Tue, 7 May 2024 09:01:09 +0300 Subject: [PATCH] fix(precheck): fails on projects in shuttle repository It can't find info.yaml, since it's looking for it in the parent directory of the gds while info.yaml is in the same directory as the gds. --- precheck/precheck.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/precheck/precheck.py b/precheck/precheck.py index 9e8f923..4bde906 100644 --- a/precheck/precheck.py +++ b/precheck/precheck.py @@ -150,7 +150,11 @@ def main(): if args.template_def: template_def = args.template_def else: - yaml_dir = os.path.dirname(os.path.dirname(args.gds)) + yaml_dir = os.path.dirname(args.gds) + while not os.path.exists(f"{yaml_dir}/info.yaml"): + yaml_dir = os.path.dirname(yaml_dir) + if yaml_dir == "/": + raise PrecheckFailure("info.yaml not found") yaml_file = f"{yaml_dir}/info.yaml" yaml_data = yaml.safe_load(open(yaml_file)) logging.info("info.yaml data:" + str(yaml_data))