die if write to output file fails for any reason.
This commit is contained in:
parent
c13600b7fb
commit
df4e0f2f0e
1 changed files with 3 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
# hierarchy-comparison -*- Perl -*-
|
# hierarchy-comparison -*- Perl -*-
|
||||||
# Possible bug: only -type f and -type d are checked
|
# Possible bug: only -type f and -type d are checked
|
||||||
# Copyright (C) 2001, 2002, 2003, 2004, 2008 Bradley M. Kuhn <bkuhn@ebb.org>
|
# Copyright (C) 2001, 2002, 2003, 2004, 2008, 2011 Bradley M. Kuhn <bkuhn@ebb.org>
|
||||||
# Copyright (C) 2011 Denver Gingerich <denver@ossguy.com>
|
# Copyright (C) 2011 Denver Gingerich <denver@ossguy.com>
|
||||||
#
|
#
|
||||||
# This software's license gives you freedom; you can copy, convey,
|
# This software's license gives you freedom; you can copy, convey,
|
||||||
|
@ -63,6 +63,8 @@ sub FindAndSortOutput {
|
||||||
print FILE_OUTPUT "$file\n";
|
print FILE_OUTPUT "$file\n";
|
||||||
}
|
}
|
||||||
close FILE_OUTPUT;
|
close FILE_OUTPUT;
|
||||||
|
die "unable to write to output file: $output: $! ($?)"
|
||||||
|
if $? != 0 and defined $output;
|
||||||
|
|
||||||
return @sortedChompedFiles;
|
return @sortedChompedFiles;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue