Skip to content

Commit

Permalink
#653 Fixed command line parameter handling on Linux and MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpalme committed Feb 24, 2024
1 parent b8dee44 commit 48386b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ CHANGELOG
5.2.2.0

* New: #651 Added setting to add custom prefix to generated history files
* Fix: #653 Fixed command line parameter handling on Linux and MacOS

5.2.1.0

Expand Down
2 changes: 2 additions & 0 deletions src/ReportGenerator.Core/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public bool GenerateReport(

Logger.Debug(Resources.Settings);
Logger.Debug(" " + JsonSerializer.ToJsonString(settings));
Logger.Debug(" " + JsonSerializer.ToJsonString(minimumCoverageThresholds));
Logger.Debug(" " + JsonSerializer.ToJsonString(riskHotspotsAnalysisThresholds));

var stopWatch = Stopwatch.StartNew();
Expand Down Expand Up @@ -345,6 +346,7 @@ private IConfigurationRoot GetConfiguration()
var args = Environment.GetCommandLineArgs()
.Where(a => !a.StartsWith("-property:"))
.Where(a => !a.StartsWith("-p:"))
.Where(a => !(a.StartsWith("/") && a.EndsWith(".dll"))) // Filter path in arguments like /home/user/.dotnet/tools/.store/dotnet-reportgenerator-globaltool/x.y.z/dotnet-reportgenerator-globaltool/x.y.z/tools/net7.0/any/ReportGenerator.dll (appears in global tool)
.Where(a => !CommandLineArgumentNames.CommandLineParameterRegex.IsMatch(a))
.ToArray();

Expand Down

0 comments on commit 48386b3

Please sign in to comment.