summary refs log tree commit diff
path: root/bundle/src
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-04-19 01:43:46 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-04-19 01:43:46 +0200
commit63d9baa1869c5a72a1a086a1304300209cdff708 (patch)
tree42ad113e3bcb644c1f0d686afbe12458fbaed5c6 /bundle/src
parentUse 1 thread on platform where fetching thread/core count fails (diff)
downloadserver-63d9baa1869c5a72a1a086a1304300209cdff708.tar.xz
Try catch cpu log
Diffstat (limited to 'bundle/src')
-rw-r--r--bundle/src/stats.ts8
1 files changed, 7 insertions, 1 deletions
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) {