Skip to content

Commit f52a108

Browse files
committed
Add fallback path for structure definition file in GenerateCommand
1 parent 08b9902 commit f52a108

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

struct_module/commands/generate.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ def _create_structure(self, args):
5151
if args.structures_path:
5252
file_path = os.path.join(args.structures_path, f"{args.structure_definition}.yaml")
5353

54+
if not os.path.exists(file_path) and args.structures_path:
55+
file_path = os.path.join(contribs_path, f"{args.structure_definition}.yaml")
56+
5457
if not os.path.exists(file_path):
5558
self.logger.error(f"File not found: {file_path}")
5659
return

0 commit comments

Comments
 (0)