Skip to content

Commit e56aab1

Browse files
committed
Raise error if files passed on CLI do not exist
Prevents pyuploadtool from starting the deployment release and deleting old releases before noticing halfway that the files cannot be found.
1 parent 4d21592 commit e56aab1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pyuploadtool/__main__.py

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Commandline interface.
33
"""
44

5+
import os
56
import sys
67

78

@@ -25,6 +26,11 @@
2526
sys.exit(1)
2627

2728

29+
for artifact in artifacts:
30+
if not os.path.exists(artifact):
31+
raise FileNotFoundError(artifact)
32+
33+
2834
def get_metadata():
2935
# create some metadata, which will be updated with the data from the build system
3036
logger.debug("creating empty metadata object")

0 commit comments

Comments
 (0)