Skip to content

Commit 00b2996

Browse files
committed
download_path commandline arg doesn't have to exist for script to function
1 parent 2fb0918 commit 00b2996

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

.github/scripts/build_assets/PathResolverAction.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@
55
class PathResolverAction(argparse.Action):
66
def __call__(self, parser, namespace, values, option_string=None):
77
path = Path(values).resolve()
8-
if not path.exists():
9-
raise ValueError(f"{path} doesn't exist.")
8+
if not self.dest == "download_path":
9+
if not path.exists():
10+
raise ValueError(f"{path} doesn't exist.")
1011

1112
if self.dest == "icons_folder_path":
1213
if not path.is_dir():
1314
raise ValueError("icons_folder_path must be a directory")
1415

15-
elif self.dest == "download_path":
16-
if not path.is_dir():
17-
raise ValueError("download_path must be a directory")
18-
1916
setattr(namespace, self.dest, str(path))

0 commit comments

Comments
 (0)