Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1028 from sawilde/bug/1027_ctrlc_no_results
Browse files Browse the repository at this point in the history
#1027 option to instruct the host to ignore ctrl+c key presses
  • Loading branch information
sawilde authored May 25, 2021
2 parents ff4c0b0 + a0d1a75 commit 06dbc26
Show file tree
Hide file tree
Showing 6 changed files with 238 additions and 202 deletions.
3 changes: 3 additions & 0 deletions ReleaseNotes.tmp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Requires .NET Framework 4.7.2

Version [[version]]
#1027 option to ignore ctrl+c key press, when ctrl+c is being used to close the target process

Version 4.7.1189
#877 remove incorrect redirects (bug)
#964 address CVE-2018-1285 in log4net 2.0.8 (prj-mgmt)
#910 import MSBuild project from NuGet package (feature)
Expand Down
4 changes: 4 additions & 0 deletions main/OpenCover.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,15 @@ private static int Main(string[] args)

using (SentrySdk.Init("https://6a7f2885b8544c7d8615df6c8064df4a@sentry.io/1369963"))
{
var version = typeof(Program).Assembly.GetName().Version;
System.Console.WriteLine($"Launching OpenCover {version}");
try
{
if (!ParseCommandLine(args, out CommandLineParser parser))
return parser.ReturnCodeOffset + 1;

System.Console.CancelKeyPress += (sender, e) => e.Cancel = parser.IgnoreCtrlC;

LogManager.GetRepository().Threshold = parser.LogLevel;

returnCodeOffset = parser.ReturnCodeOffset;
Expand Down
Binary file modified main/OpenCover.Documentation/Usage.pdf
Binary file not shown.
Loading

0 comments on commit 06dbc26

Please sign in to comment.