From 088682cb1e83af3e251dcc07f31194ab92c3153d Mon Sep 17 00:00:00 2001 From: Dan Smolsky <78942835+Tarquinen@users.noreply.github.com> Date: Sun, 8 Nov 2026 13:29:06 -0500 Subject: [PATCH] fix(desktop): show an error when opening a path in the default app fails (#62572) --- packages/desktop/src/main/files/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/desktop/src/main/files/index.ts b/packages/desktop/src/main/files/index.ts index e3bd45c16f5..8e07c627886 100644 --- a/packages/desktop/src/main/files/index.ts +++ b/packages/desktop/src/main/files/index.ts @@ -124,7 +124,13 @@ function make( return true }), openPath: Effect.fn("DesktopFiles.openPath")(function* (target: string, application?: string) { - if (!application) return yield* Effect.promise(() => shell.openPath(target)) + if (!application) { + const error = yield* Effect.promise(() => shell.openPath(target)) + + if (error) return yield* Effect.fail(new Error(error)) + + return + } if (process.platform === "win32" && /^powershell(\.exe)?$/i.test(path.basename(application))) { const info = yield* fs.stat(target)