From 34fc2b718bdfe586e44a3008f7652149c21d5c68 Mon Sep 17 00:00:00 2001 From: Etaash Mathamsetty <45927311+Etaash-mathamsetty@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:25:37 -0500 Subject: [PATCH] [FIX] Runtime isInstalled potential crash (#4076) Revert "[FIX] Runtime isInstalled potential crash" This reverts commit 9d424ef301175b8e004fd3daca1f78d31094daff. [FIX] Runtime isInstalled potential crash --- src/backend/wine/runtimes/runtimes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/wine/runtimes/runtimes.ts b/src/backend/wine/runtimes/runtimes.ts index 543aefcbf5..3f92a97932 100644 --- a/src/backend/wine/runtimes/runtimes.ts +++ b/src/backend/wine/runtimes/runtimes.ts @@ -71,7 +71,7 @@ async function download(name: RuntimeName): Promise { async function isInstalled(name: RuntimeName) { if (!existsSync(join(runtimePath, name))) return false - const runtimes = await _get() + const runtimes = await _get().catch(() => []) const runtime = runtimes.find((inst) => inst.name === name) // this should be impossible, so prevent redownload by faking it's installed