Skip to content

Commit

Permalink
Only try to change perms if the hints file already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
bingos committed Aug 22, 2013
1 parent fc01a16 commit 28b9d59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = Devel-PatchPerl
version = 1.08
version = 1.10
author = Chris Williams <chris@bingosnet.co.uk>
license = Perl_5
copyright_holder = Chris Williams and Marcus Holland-Moritz
Expand Down
4 changes: 3 additions & 1 deletion lib/Devel/PatchPerl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ sub _patch_hints {
foreach my $os ( @os ) {
return unless my ($file,$data) = hint_file( $os );
my $path = File::Spec->catfile( 'hints', $file );
chmod 0644, $path or die "$!\n";
if ( -e $path ) {
chmod 0644, $path or die "$!\n";
}
open my $fh, '>', $path or die "$!\n";
print $fh $data;
close $fh;
Expand Down

0 comments on commit 28b9d59

Please sign in to comment.