From 7cbaebdd2bee38d814e3e9693e66a97ea051aa8c Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sun, 10 Oct 2021 11:13:51 +0200 Subject: [PATCH] :bug: fix windows process.getuid --- bundle/src/stats.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundle/src/stats.ts b/bundle/src/stats.ts index 49705424..18bb85ca 100644 --- a/bundle/src/stats.ts +++ b/bundle/src/stats.ts @@ -7,7 +7,7 @@ export function initStats() { console.log(`[CPU] ${osu.cpu.model()} Cores x${osu.cpu.count()}`); console.log(`[System] ${os.platform()} ${os.arch()}`); console.log(`[Process] running with pid: ${process.pid}`); - if (process.getuid() === 0) { + if (process.getuid && process.getuid() === 0) { console.warn( red( `[Process] Warning fosscord is running as root, this highly discouraged and might expose your system vulnerable to attackers. Please run fosscord as a user without root privileges.`