Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): Linux AppImage settings restarts launch a fresh instance #15681

Closedsergeytiron(GitHub profile, opens in a new tab)wants to merge 7 commits intomain fromrefs/pull/15681/headopened View on GitHub

Showing 7 changed files with 58 additions and 18 deletions (loading 4).

x
0 of 7 viewed, 7 left
39 additions and 2 deletionsapps/desktop/src/app/DesktopLifecycle.test.tsModified
View file
@@ -258,7 +258,6 @@
return yield* Deferred.await(relaunched);
}).pipe(
Effect.provide(layer),
- Effect.provideService(HostProcess.ExecutablePath, "/opt/T3 Code/t3code"),
Effect.provideService(HostProcess.Arguments, [
"/opt/T3 Code/t3code",
"--no-sandbox",
@@ -267,7 +266,45 @@
]),
​
- assert.deepEqual(options, { execPath: "/opt/T3 Code/t3code", args: ["--no-sandbox"] });
+ assert.deepEqual(options, { args: ["--no-sandbox"] });
+ }),
+ );
+​
+ it.effect("exits after shutdown even when scheduling the relaunch fails", () =>
+ Effect.gen(function* () {
+ const exited = yield* Deferred.make<number>();
+ const layerEnvironment = Layer.succeed(DesktopEnvironment.DesktopEnvironment, {
+ platform: "linux",
+ isDevelopment: false,
+ } as DesktopEnvironment.DesktopEnvironment["Service"]);
+ const layer = DesktopLifecycle.layer.pipe(
+ Layer.provideMerge(
+ layerElectronApp(
+ new Map(),
+ Effect.void,