| author | |
| committer | |
| log | 5623089aea68ca62811f51321686c259fa4c810f |
| tree | cf7dfeb66aab2cf0b19c4ea935d3bbb7254bf56a |
| parent | a62e7d670c67bf221a5699b5a988367781fead74 |
| signature | Signed by PGP key B5690EEEBB952194 |
3 files changed, 15 insertions(+), 3 deletions(-)
apps/server/src/project/ProjectSetupScriptRunner.test.ts+8-1| ... | ... | @@ -112,7 +112,12 @@ describe("ProjectSetupScriptRunner", () => { |
| 112 | 112 | terminalId: "setup-default-setup", |
| 113 | 113 | cwd: "/repo/worktrees/a", |
| 114 | 114 | worktreePath: "/repo/worktrees/a", |
| 115 | env: { T3CODE_PROJECT_ROOT: "/repo/project", T3CODE_WORKTREE_PATH: "/repo/worktrees/a" }, | |
| 115 | env: { | |
| 116 | T3CODE_PROJECT_ROOT: "/repo/project", | |
| 117 | T3CODE_WORKTREE_PATH: "/repo/worktrees/a", | |
| 118 | NO_COLOR: "1", | |
| 119 | FORCE_COLOR: "0", | |
| 120 | }, | |
| 116 | 121 | }); |
| 117 | 122 | expect(write).toHaveBeenCalledWith({ |
| 118 | 123 | threadId: "thread-1", |
| ... | ... | @@ -211,6 +216,8 @@ describe("ProjectSetupScriptRunner", () => { |
| 211 | 216 | cwd: "/repo/worktrees/a", |
| 212 | 217 | worktreePath: "/repo/worktrees/a", |
| 213 | 218 | env: { |
| 219 | NO_COLOR: "1", | |
| 220 | FORCE_COLOR: "0", | |
| 214 | 221 | T3CODE_PROJECT_ROOT: "/repo/project", |
| 215 | 222 | T3CODE_WORKTREE_PATH: "/repo/worktrees/a", |
| 216 | 223 | }, |
apps/server/src/project/ProjectSetupScriptRunner.ts+2-1| ... | ... | @@ -361,7 +361,8 @@ export const make = Effect.gen(function* () { |
| 361 | 361 | terminalId, |
| 362 | 362 | cwd, |
| 363 | 363 | worktreePath: input.worktreePath, |
| 364 | env, | |
| 364 | // Setup may run before a terminal client attaches to answer color probes. | |
| 365 | env: { ...env, NO_COLOR: "1", FORCE_COLOR: "0" }, | |
| 365 | 366 | }) |
| 366 | 367 | .pipe( |
| 367 | 368 | Effect.mapError( |
apps/server/src/terminal/Manager.test.ts+5-1| ... | ... | @@ -1934,13 +1934,15 @@ it.layer( |
| 1934 | 1934 | |
| 1935 | 1935 | it.effect("injects runtime env overrides into spawned terminals", () => |
| 1936 | 1936 | Effect.gen(function* () { |
| 1937 | const { manager, ptyAdapter } = yield* createManager(); | |
| 1937 | const { manager, ptyAdapter } = yield* createManager(5, { env: { FORCE_COLOR: "3" } }); | |
| 1938 | 1938 | yield* manager.open( |
| 1939 | 1939 | openInput({ |
| 1940 | 1940 | env: { |
| 1941 | 1941 | T3CODE_PROJECT_ROOT: "/repo", |
| 1942 | 1942 | T3CODE_WORKTREE_PATH: "/repo/worktree-a", |
| 1943 | 1943 | CUSTOM_FLAG: "1", |
| 1944 | NO_COLOR: "1", | |
| 1945 | FORCE_COLOR: "0", | |
| 1944 | 1946 | }, |
| 1945 | 1947 | }), |
| 1946 | 1948 | ); |
| ... | ... | @@ -1951,6 +1953,8 @@ it.layer( |
| 1951 | 1953 | assert.equal(spawnInput.env.T3CODE_PROJECT_ROOT, "/repo"); |
| 1952 | 1954 | assert.equal(spawnInput.env.T3CODE_WORKTREE_PATH, "/repo/worktree-a"); |
| 1953 | 1955 | assert.equal(spawnInput.env.CUSTOM_FLAG, "1"); |
| 1956 | assert.equal(spawnInput.env.NO_COLOR, "1"); | |
| 1957 | assert.equal(spawnInput.env.FORCE_COLOR, "0"); | |
| 1954 | 1958 | }), |
| 1955 | 1959 | ); |
| 1956 | 1960 |