Skip to content

Commit c35167f

Browse files
committed
sometimes CPU info is not available #3957
1 parent 929f7f3 commit c35167f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/www.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ function startTrilium() {
6060
log.info(JSON.stringify(appInfo, null, 2));
6161

6262
const cpuInfos = require('os').cpus();
63-
log.info(`CPU model: ${cpuInfos[0].model}, logical cores: ${cpuInfos.length} freq: ${cpuInfos[0].speed} Mhz`); // for perf. issues it's good to know the rough configuration
63+
if (cpuInfos && cpuInfos[0] !== undefined) { // https://github.com/zadam/trilium/pull/3957
64+
log.info(`CPU model: ${cpuInfos[0].model}, logical cores: ${cpuInfos.length} freq: ${cpuInfos[0].speed} Mhz`); // for perf. issues it's good to know the rough configuration
65+
}
6466

6567
const httpServer = startHttpServer();
6668

0 commit comments

Comments
 (0)