Skip to content

Commit 48386b3

Browse files
committed
#653 Fixed command line parameter handling on Linux and MacOS
1 parent b8dee44 commit 48386b3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/Readme.txt

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ CHANGELOG
7070
5.2.2.0
7171

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

7475
5.2.1.0
7576

src/ReportGenerator.Core/Generator.cs

+2
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ public bool GenerateReport(
153153

154154
Logger.Debug(Resources.Settings);
155155
Logger.Debug(" " + JsonSerializer.ToJsonString(settings));
156+
Logger.Debug(" " + JsonSerializer.ToJsonString(minimumCoverageThresholds));
156157
Logger.Debug(" " + JsonSerializer.ToJsonString(riskHotspotsAnalysisThresholds));
157158

158159
var stopWatch = Stopwatch.StartNew();
@@ -345,6 +346,7 @@ private IConfigurationRoot GetConfiguration()
345346
var args = Environment.GetCommandLineArgs()
346347
.Where(a => !a.StartsWith("-property:"))
347348
.Where(a => !a.StartsWith("-p:"))
349+
.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)
348350
.Where(a => !CommandLineArgumentNames.CommandLineParameterRegex.IsMatch(a))
349351
.ToArray();
350352

0 commit comments

Comments
 (0)