History

fix(server): avoid color probe hangs in setup terminals

Julius Marminge committed 2 months ago

Commit e1da3351 parent 00d61094 files · +21 −8Browse files

Showing the changes to apps/server/src/project/ProjectSetupScriptRunner.ts (1 of 4 files). Show all

Unified · Split

apps/server/src/project/ProjectSetupScriptRunner.ts+10−4
@@ -149,10 +149,16 @@ export const make = Effect.gen(function* () { · 148 unmodified lines
149 149
150 const terminalId = input.preferredTerminalId ?? `setup-${script.id}`;150 const terminalId = input.preferredTerminalId ?? `setup-${script.id}`;
151 const cwd = input.worktreePath;151 const cwd = input.worktreePath;
152 const env = projectScriptRuntimeEnv({152 const env = {
153 project: { cwd: project.workspaceRoot },153 ...projectScriptRuntimeEnv({
154 worktreePath: input.worktreePath,154 project: { cwd: project.workspaceRoot },
155 });155 worktreePath: input.worktreePath,
156 }),
157 // Setup runs before a client necessarily attaches. Truecolor probing in
158 // tools such as vp can wait for terminal replies that nobody can send.
159 // Keep TERM's 256-color support without advertising truecolor here.
160 COLORTERM: "",
161 };
156 162
157 yield* terminalManager163 yield* terminalManager
158 .open({164 .open({