From 4aab00f26773c0bbe0170d3483b65d855be3045c Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Wed, 2 Sep 2026 12:30:28 +0200 Subject: [PATCH] fix(desktop): use CLI shim for packaged Linux installs (#4207) Non-AppImage packages install the Electron executable at a stable path, but invoking it through the CLI symlink cannot restart the daemon. Link the bundled CLI shim for those targets while preserving AppImage links.\n\nFixes #4184 --- .../desktop/src/integrations/cli-install/path.test.ts | 11 +++++++++++ packages/desktop/src/integrations/cli-install/path.ts | 1 + 2 files changed, 12 insertions(+) diff --git a/packages/desktop/src/integrations/cli-install/path.test.ts b/packages/desktop/src/integrations/cli-install/path.test.ts index e1b64a6c05..472f066e00 100644 --- a/packages/desktop/src/integrations/cli-install/path.test.ts +++ b/packages/desktop/src/integrations/cli-install/path.test.ts @@ -25,6 +25,17 @@ describe("cli-install-path", () => { ).toBe("/home/user/Applications/Paseo.AppImage"); }); + it("uses the bundled shim for packaged linux installs outside an AppImage", () => { + expect( + resolveCliInstallSourcePath({ + platform: "linux", + isPackaged: true, + executablePath: "/opt/Paseo/Paseo", + shimPath: "/opt/Paseo/resources/bin/paseo", + }), + ).toBe("/opt/Paseo/resources/bin/paseo"); + }); + it("falls back to the shim on windows and in development", () => { expect( resolveCliInstallSourcePath({ diff --git a/packages/desktop/src/integrations/cli-install/path.ts b/packages/desktop/src/integrations/cli-install/path.ts index c0ecd27f8c..c9114c2301 100644 --- a/packages/desktop/src/integrations/cli-install/path.ts +++ b/packages/desktop/src/integrations/cli-install/path.ts @@ -22,6 +22,7 @@ export function resolveCliInstallSourcePath(input: { if (appImagePath) { return appImagePath; } + return input.shimPath; } return input.executablePath;