Skip to content

Commit 60a6ff5

Browse files
committed
fix: validating required arguments in all cases
1 parent 27df6e0 commit 60a6ff5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dyana/loaders/loader.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ def __init__(
7272
if args:
7373
self.build_args = self.settings.parse_build_args(args)
7474
self.args = self.settings.parse_args(args)
75+
76+
for arg in self.settings.args:
77+
if arg.required and not self.args:
78+
raise ValueError(f"Argument --{arg.name} is required")
7579
else:
7680
self.settings = None
7781

0 commit comments

Comments
 (0)