Skip to content

Commit

Permalink
Fixed problem with IncludeInOutput not being specified (#1045) (#1046)
Browse files Browse the repository at this point in the history
* Fixed static code analyzer issues reported in (#972)

* In case IncludeInOutput is not specified code should be generated.

---------

Co-authored-by: Jesper Glintborg <jesper.glintborg@siemensgamesa.com>
  • Loading branch information
dxdjgl and Jesper Glintborg committed Mar 19, 2023
1 parent e910298 commit e719cc7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void AddExtraPath(string? fragment)
}

bool includeInOutput = true;
if (userOptions is not null && userOptions.TryGetValue(Literals.AdditionalFileMetadataPrefix + "IncludeInOutput", out var optionValue) && bool.TryParse(optionValue, out includeInOutput))
if (userOptions is not null && userOptions.TryGetValue(Literals.AdditionalFileMetadataPrefix + "IncludeInOutput", out var optionValue) && !string.IsNullOrWhiteSpace(optionValue) && bool.TryParse(optionValue, out includeInOutput))
{
// Do nothing here as includeInOutput will be overwritten by .TryParse,
// if a value was successfully read and parsed.
Expand Down

0 comments on commit e719cc7

Please sign in to comment.