diff --git a/src/server.ts b/src/server.ts index a5f82475..ead4b4e7 100644 --- a/src/server.ts +++ b/src/server.ts @@ -85,10 +85,12 @@ export function startServer(port: number, device: string | null = null, enableCo const begin = Date.now(); let wakeLock: any; - try { - wakeLock = new WakeLock("saxi plotting"); - } catch (e) { - console.warn("Couldn't acquire wake lock. Ensure your machine does not sleep during plotting"); + if (process.platform === 'darwin') { + try { + wakeLock = new WakeLock("saxi plotting"); + } catch (e) { + console.warn("Couldn't acquire wake lock. Ensure your machine does not sleep during plotting"); + } } try {