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.
This commit is contained in:
Uri Shaked
2024-05-07 09:01:09 +03:00
parent 79f41ef2e1
commit d2d27ab36c
+5 -1
View File
@@ -150,7 +150,11 @@ def main():
if args.template_def: if args.template_def:
template_def = args.template_def template_def = args.template_def
else: 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_file = f"{yaml_dir}/info.yaml"
yaml_data = yaml.safe_load(open(yaml_file)) yaml_data = yaml.safe_load(open(yaml_file))
logging.info("info.yaml data:" + str(yaml_data)) logging.info("info.yaml data:" + str(yaml_data))