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)
304304 using var configuration = JsonDocument . Parse ( jsonString , documentOptions ) ;
305305
306306 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+ }
308311
309312 if ( runtimeOptionsElement . TryGetProperty ( "framework" , out JsonElement frameworkElement ) )
310313 {
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ private void CreateDeterministicTestPropsFile()
4949 _testProjectTfm = XElement . Load ( Path . Combine ( _testProjectPath , "coverlet.integration.determisticbuild.csproj" ) ) ! .
5050 Descendants ( "PropertyGroup" ) ! . Single ( ) . Element ( "TargetFramework" ) ! . Value ;
5151
52- deterministicTestProps . Save ( Path . Combine ( propsFile ) ) ;
52+ deterministicTestProps . Save ( propsFile ) ;
5353 }
5454
5555 private protected void AssertCoverage ( string standardOutput = "" , bool checkDeterministicReport = true )
You can’t perform that action at this time.
0 commit comments