Skip to content

Commit 5f1ca9f

Browse files
author
Sam Kleinman
committed
build: better erroring on copy-if-needed script
1 parent f1b4b2f commit 5f1ca9f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/copy-if-needed.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ def send_output(message, verbosity):
2222
pass
2323

2424
def copy_if_needed(input_file, output_file, builder, verbosity=True):
25-
if os.path.isfile(output_file) is False:
25+
if os.path.isfile(input_file) is False:
26+
exit("[" + builder + "]: ERROR: Input file doesn't exist. Call this script later in the build process.")
27+
elif os.path.isfile(output_file) is False:
2628
shutil.copyfile(input_file, output_file)
2729
send_output('[' + builder + ']: created "' + output_file + ';" rebuild needed.', verbosity)
2830
else:

0 commit comments

Comments
 (0)