将powerShellStart作为配置项选择开启

This commit is contained in:
yeyang
2023-05-01 00:18:40 +08:00
parent 94e7736856
commit d2f3f41ced
3 changed files with 4 additions and 4 deletions

View File

@@ -26,3 +26,5 @@ sesepro: false #涩涩增强
statusTask: true #状态网速定时器
renderScale: 100 #渲染精度
anonymous: false #匿名
#如果出现内存异常的情况可将此配置项开启,如果打开后报错请将状态定时器关闭
statusPowerShellStart: false

View File

@@ -94,9 +94,7 @@ export default new class OSUtils {
// 给有问题的用户关闭定时器
if (!Config.Notice.statusTask) return
try {
if (process.platform == 'win32') this.si.powerShellStart()
} catch {}
if (Config.Notice.statusPowerShellStart) this.si.powerShellStart()
// 网速
const Timer = setInterval(async () => {

View File

@@ -21,7 +21,7 @@
"dependencies": {
"cheerio": "1.0.0-rc.12",
"jimp": "^0.22.7",
"systeminformation": "^5.17.1"
"systeminformation": "^5.17.12"
},
"devDependencies": {
"all-contributors-cli": "^6.24.0"