Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): an AppImage launch drops earlier launches' mount dirs from the server PATH #18808

MergedMnigos(GitHub profile, opens in a new tab)merged 8 commits intomain fromrefs/pull/18808/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 77 additions and 0 deletions.

x
0 of 2 viewed, 2 left
43 additions and 0 deletionsapps/desktop/src/shell/DesktopShellEnvironment.test.tsModified
View file
@@ -530,6 +530,49 @@
}),
​
+ it.effect("drops earlier AppImage launches' mount dirs from the search paths on linux", () =>
+ Effect.gen(function* () {
+ const current = "/var/tmp/.mount_cur";
+ const env: NodeJS.ProcessEnv = {
+ SHELL: "/bin/zsh",
+ APPIMAGE: "/home/me/T3-Code.AppImage",
+ APPDIR: `${current}/`,
+ PATH: `${current}/usr/bin:/tmp/.mount_old/usr/bin:/usr/bin`,
+ LD_LIBRARY_PATH: `/tmp/.mount_old/usr/lib:${current}/usr/lib::/opt/lib`,
+ XDG_DATA_DIRS: "/tmp/.mount_old/usr/share:/var/tmp/.mount_cur2/usr/share",
+ };
+​
+ yield* runShellEnvironment({
+ env,
+ platform: "linux",
+ handler: () => envOutput({ PATH: "/tmp/.mount_older/usr/bin:/home/me/.local/bin" }),
+ });
+​
+ assert.equal(env.PATH, `/home/me/.local/bin:${current}/usr/bin:/usr/bin`);
+ assert.equal(env.LD_LIBRARY_PATH, `${current}/usr/lib::/opt/lib`);
+ assert.equal(env.XDG_DATA_DIRS, undefined);
+ }),
+ );
+​
+ it.effect("keeps AppImage-looking search paths outside an AppImage launch", () =>
+ Effect.gen(function* () {