need to wrap windows shell process spawning to avoid warnings on other systems

This commit is contained in:
Egor 2026-01-17 22:21:59 -08:00
parent cbc14e1ca0
commit 3ab518f090

View file

@ -70,7 +70,9 @@ export function startMonitoring(window: BrowserWindow) {
mainWindow = window; mainWindow = window;
isRunning = true; isRunning = true;
powerShellStart(); if (platform === 'win32') {
powerShellStart();
}
void collectAndSendCpuMetrics(); void collectAndSendCpuMetrics();
cpuInterval = setInterval(() => { cpuInterval = setInterval(() => {
@ -105,7 +107,9 @@ export function stopMonitoring() {
} }
isRunning = false; isRunning = false;
powerShellRelease(); if (platform === 'win32') {
powerShellRelease();
}
} }
function updateTrayWithMetrics() { function updateTrayWithMetrics() {