From 66bc25c29b7a507c2567d12206060749b522f7ba Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Fri, 16 Sep 2022 12:45:49 -0400 Subject: [PATCH] Use click to require file arg to exist --- galaxy_upload/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy_upload/upload.py b/galaxy_upload/upload.py index dcd2def..7619537 100644 --- a/galaxy_upload/upload.py +++ b/galaxy_upload/upload.py @@ -172,7 +172,7 @@ def upload_file( "--silent", is_flag=True, default=False, help="No output while uploading" ) @optgroup.option("--debug", is_flag=True, default=False, help="Debug output") -@click.argument("path", type=click.Path(), nargs=-1) +@click.argument("path", type=click.Path(exists=True, dir_okay=False), nargs=-1) def main(url, path, api_key, **kwargs): paths = path if not paths: