From 573052f0c5c53143039950910ad219544caa3f67 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Tue, 19 Apr 2022 01:43:46 +0200 Subject: Try catch cpu log --- bundle/src/stats.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bundle/src/stats.ts b/bundle/src/stats.ts index 3c5163c3..0234e0b4 100644 --- a/bundle/src/stats.ts +++ b/bundle/src/stats.ts @@ -4,7 +4,13 @@ import { red } from "picocolors"; export function initStats() { console.log(`[Path] running in ${__dirname}`); - console.log(`[CPU] ${osu.cpu.model()} Cores x${osu.cpu.count()}`); + try { + console.log(`[CPU] ${osu.cpu.model()} Cores x${osu.cpu.count()}`); + } + catch { + console.log('[CPU] Failed to get cpu model!') + } + console.log(`[System] ${os.platform()} ${os.arch()}`); console.log(`[Process] running with PID: ${process.pid}`); if (process.getuid && process.getuid() === 0) { -- cgit 1.4.1