Skip to content

Commit 69fecaf

Browse files
author
Vincent Lefebvre
committed
Changed merging behavior: merges the result with the specified file only if the file exists.
1 parent 34c4e50 commit 69fecaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/coverlet.core/Coverage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public CoverageResult GetCoverageResult()
151151
}
152152

153153
var coverageResult = new CoverageResult { Identifier = _identifier, Modules = modules };
154-
if (!string.IsNullOrEmpty(_mergeWith) && !string.IsNullOrWhiteSpace(_mergeWith))
154+
if (!string.IsNullOrEmpty(_mergeWith) && !string.IsNullOrWhiteSpace(_mergeWith) && File.Exists(_mergeWith))
155155
{
156156
string json = File.ReadAllText(_mergeWith);
157157
coverageResult.Merge(JsonConvert.DeserializeObject<Modules>(json));

0 commit comments

Comments
 (0)