Skip to content
Source
Sign inSign up
pingdotgg/t3code

Fix Linux desktop Codex CLI detection at startup #1100

MergedRyan-D-Gast(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/1100/headmerged by juliusmarminge View on GitHub

Showing 6 changed files with 52 additions and 8 deletions (loading 3).

x
0 of 6 viewed, 6 left
24 additions and 4 deletionsapps/desktop/src/syncShellEnvironment.test.tsModified
View file
@@ -62,14 +62,13 @@
expect(env.SSH_AUTH_SOCK).toBe("/tmp/inherited.sock");
});
​
- it("does nothing outside macOS", () => {
+ it("hydrates PATH and missing SSH_AUTH_SOCK from the login shell on linux", () => {
const env: NodeJS.ProcessEnv = {
SHELL: "/bin/zsh",
PATH: "/usr/bin",
- SSH_AUTH_SOCK: "/tmp/inherited.sock",
};
const readEnvironment = vi.fn(() => ({
- PATH: "/opt/homebrew/bin:/usr/bin",
+ PATH: "/home/linuxbrew/.linuxbrew/bin:/usr/bin",
SSH_AUTH_SOCK: "/tmp/secretive.sock",
}));
​
@@ -78,8 +77,29 @@
readEnvironment,
});
​
+ expect(readEnvironment).toHaveBeenCalledWith("/bin/zsh", ["PATH", "SSH_AUTH_SOCK"]);
+ expect(env.PATH).toBe("/home/linuxbrew/.linuxbrew/bin:/usr/bin");
+ expect(env.SSH_AUTH_SOCK).toBe("/tmp/secretive.sock");
+ });
+​
+ it("does nothing outside macOS and linux", () => {
+ const env: NodeJS.ProcessEnv = {
+ SHELL: "C:/Program Files/Git/bin/bash.exe",