diff --git a/CHANGELOG.md b/CHANGELOG.md index fcb312047..889cd9fc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 2.1.1 +- Feature: listen ctrl+c at the very beginning ## 2.1.0 - Feature[#691]: 重构并优化基于qinglong的部署方式,尝试解决偶发的安装失败的问题 - Feature[#670]: 新增针对App的AppUserAgent配置项,用于解决大会员大积分异常问题 diff --git a/common.props b/common.props index 6f3db6b1e..0ec5d8885 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ Ray - 2.1.0 + 2.1.1 $(NoWarn);CS1591;CS0436 diff --git a/src/Ray.BiliBiliTool.Console/Program.cs b/src/Ray.BiliBiliTool.Console/Program.cs index 0e3da4a4a..64f437ef7 100644 --- a/src/Ray.BiliBiliTool.Console/Program.cs +++ b/src/Ray.BiliBiliTool.Console/Program.cs @@ -1,5 +1,6 @@ using System; using System.Reflection; +using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -18,6 +19,12 @@ public class Program { public static async Task Main(string[] args) { + System.Console.CancelKeyPress += (sender, eventArgs) => + { + eventArgs.Cancel = true; + Environment.Exit(0); + }; + PrintLogo(); IHost host = CreateHost(args);