We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5de9d0b commit 161fff3Copy full SHA for 161fff3
dvuploader/cli.py
@@ -90,7 +90,7 @@ def _validate_inputs(
90
91
@app.command()
92
def main(
93
- filepaths: List[str] = typer.Argument(
+ filepaths: Optional[List[str]] = typer.Argument(
94
default=None,
95
help="A list of filepaths to upload.",
96
),
@@ -141,6 +141,15 @@ def main(
141
Upload files via config file:
142
$ dvuploader --config-path upload_config.yaml
143
"""
144
+
145
+ if not filepaths and not config_path:
146
+ raise typer.BadParameter(
147
+ "You must provide either a list of filepaths or a path to a configuration file via the --config-path option."
148
+ )
149
150
+ if filepaths is None:
151
+ filepaths = []
152
153
_validate_inputs(
154
filepaths=filepaths,
155
pid=pid,
0 commit comments