Skip to content

Commit

Permalink
Rescue File::Error when trying to delete tmpfile
Browse files Browse the repository at this point in the history
  • Loading branch information
littleforest committed Mar 29, 2024
1 parent 8996f90 commit 3039100
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/coverage_reporter/parsers/coveragepy_parser.cr
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ module CoverageReporter
raise ParserError.new(error.to_s)
end
ensure
tmpfile && File.exists?(tmpfile.path) && tmpfile.delete
begin
tmpfile && tmpfile.delete
rescue File::Error
end
end
end
end

0 comments on commit 3039100

Please sign in to comment.