1 Description: die if perltidy.ERR and other temporary files cannot be unlinked
2 Origin: vendor, https://bugs.debian.org/862667
3 Author: Don Armstrong <don@debian.org>
8 my $msg = qx/perl $flags $quoted_stream_filename $error_redirection/;
10 - unlink $stream_filename if ($is_tmpfile);
11 + unlink $stream_filename or
12 + Perl::Tidy::Die("couldn't unlink stream ${stream_filename}: $!\n")
14 return $stream_filename, $msg;
17 @@ -4128,7 +4130,10 @@
19 # remove any old error output file if we might write a new one
20 unless ( $fh_warnings || ref($warning_file) ) {
21 - if ( -e $warning_file ) { unlink($warning_file) }
22 + if ( -e $warning_file ) {
23 + unlink($warning_file) or
24 + Perl::Tidy::Die("couldn't unlink warning file ${warning_file}: $!\n");