commit f1d86f441ffb0f699a7568d46d1861a4d827bd75 parent ff16e7da57762403824b26d0bf9bb00c20e9d705 Author: Kyle Milz <kyle@0x30.net> Date: Sun, 26 Jun 2016 22:51:07 -0600 Test: die if file does not exist in Package Diffstat:
M | Test/Package.pm | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Test/Package.pm b/Test/Package.pm @@ -78,7 +78,9 @@ sub parse_output { sub get_file_size { my ($self, $file) = @_; - return ((stat "$self->{srcdir}/$file")[7]); + + die "file '$file' does not exist." unless (-f "$self->{srcdir}$file"); + return ((stat "$self->{srcdir}$file")[7]); } sub clean {