1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 10:22:39 +01:00

Try catch cpu log

This commit is contained in:
TheArcaneBrony 2022-04-19 01:43:46 +02:00
parent 96b3929fa4
commit 573052f0c5
No known key found for this signature in database
GPG Key ID: 32FC5AAADAD75A22

View File

@ -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) {