From 9eafb5683bc05c57cd55a7d26b339b496224ec3c Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Sun, 1 Sep 2024 14:59:35 +0200 Subject: [PATCH] fix code --- .github/workflows/build.yml | 2 ++ src/main/index.ts | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3fc9ca55..48529b45 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -113,8 +113,10 @@ jobs: - run: npx tsx script/e2e.mts 'dist/mac-arm64/LosslessCut.app/Contents/MacOS/LosslessCut' screenshot-macos.jpeg if: startsWith(matrix.os, 'macos') + - run: npx tsx script/e2e.mts 'dist/win-x64/LosslessCut.app/Contents/MacOS/LosslessCut' screenshot-windows.jpeg if: startsWith(matrix.os, 'windows') + - run: | export DISPLAY=:0 sudo Xvfb -ac :0 -screen 0 1280x1024x24 > /dev/null 2>&1 & diff --git a/src/main/index.ts b/src/main/index.ts index 8496bb49..b3ca2302 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -405,10 +405,9 @@ export function focusWindow() { } } -export async function quitApp() { +export function quitApp() { // allow HTTP API to respond etc. - await timers.setTimeout(1000); - electron.app.quit(); + timers.setTimeout(1000).then(() => electron.app.quit()); } export const hasDisabledNetworking = () => !!disableNetworking;