Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): recover failed shell environment capture #10537

ClosedGigioxx(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/10537/headopened View on GitHub

Showing 5 changed files with 145 additions and 7 deletions (loading 2).

x
0 of 5 viewed, 5 left
8 additions and 1 deletionapps/desktop/src/app/DesktopApp.tsModified
View file
@@ -3,6 +3,7 @@
import * as Effect from "effect/Effect";
import * as Option from "effect/Option";
import * as Ref from "effect/Ref";
+import * as Result from "effect/Result";
import * as Schema from "effect/Schema";
​
import * as NetService from "@t3tools/shared/Net";
@@ -27,6 +28,7 @@
import * as DesktopServerExposure from "../backend/DesktopServerExposure.ts";
import * as DesktopAppSettings from "../settings/DesktopAppSettings.ts";
import * as DesktopShellEnvironment from "../shell/DesktopShellEnvironment.ts";
+import { recoverShellEnvironment } from "../shell/DesktopShellEnvironmentRecovery.ts";
import * as DesktopState from "./DesktopState.ts";
import * as DesktopRemoteUpdates from "../updates/DesktopRemoteUpdates.ts";
import * as DesktopUpdates from "../updates/DesktopUpdates.ts";
@@ -271,7 +273,7 @@
const updates = yield* DesktopUpdates.DesktopUpdates;
const environment = yield* DesktopEnvironment.DesktopEnvironment;
​
- yield* shellEnvironment.installIntoProcess;
+ const shellEnvironmentResult = yield* Effect.result(shellEnvironment.installIntoProcess);
const hasCommandLinePasswordStore =
preReadyElectronOptions.linuxPasswordStoreCommandLine !== null;
const linuxElectronOptions =
@@ -316,6 +318,11 @@
Effect.catchCause((cause) => fatalStartupCause("whenReady", cause)),