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
149149
150150 const terminalId = input.preferredTerminalId ?? `setup-${script.id}`;
151151 const cwd = input.worktreePath;
152− const env = projectScriptRuntimeEnv({
153− project: { cwd: project.workspaceRoot },
154− worktreePath: input.worktreePath,
155− });
152+ const env = {
153+ ...projectScriptRuntimeEnv({
154+ project: { cwd: project.workspaceRoot },
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+ };
156162
157163 yield* terminalManager
158164 .open({