File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
src/coverlet.core/Instrumentation
test/coverlet.integration.tests Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -304,7 +304,10 @@ public RuntimeConfigurationReader(string runtimeConfigFile)
304
304
using var configuration = JsonDocument . Parse ( jsonString , documentOptions ) ;
305
305
306
306
JsonElement rootElement = configuration . RootElement ;
307
- JsonElement runtimeOptionsElement = rootElement . GetProperty ( "runtimeOptions" ) ;
307
+ if ( ! rootElement . TryGetProperty ( "runtimeOptions" , out JsonElement runtimeOptionsElement ) )
308
+ {
309
+ throw new InvalidOperationException ( $ "The 'runtimeOptions' property is missing in the runtime configuration file { _runtimeConfigFile } .") ;
310
+ }
308
311
309
312
if ( runtimeOptionsElement . TryGetProperty ( "framework" , out JsonElement frameworkElement ) )
310
313
{
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ private void CreateDeterministicTestPropsFile()
49
49
_testProjectTfm = XElement . Load ( Path . Combine ( _testProjectPath , "coverlet.integration.determisticbuild.csproj" ) ) ! .
50
50
Descendants ( "PropertyGroup" ) ! . Single ( ) . Element ( "TargetFramework" ) ! . Value ;
51
51
52
- deterministicTestProps . Save ( Path . Combine ( propsFile ) ) ;
52
+ deterministicTestProps . Save ( propsFile ) ;
53
53
}
54
54
55
55
private protected void AssertCoverage ( string standardOutput = "" , bool checkDeterministicReport = true )
You can’t perform that action at this time.
0 commit comments