Skip to content

Commit b54c93c

Browse files
authored
Merge pull request #220 from vlef/fix-merge-results-creates-file
Merging should not fail if file doesn't exist
2 parents 34c4e50 + 69fecaf commit b54c93c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/coverlet.core/Coverage.cs

+1-1
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)