fix: use event-driven renderer for build progress
This commit is contained in:
+9
-3
@@ -738,7 +738,7 @@ export async function runUp(
|
||||
};
|
||||
const workspacePath = `/workspaces/${encodeURIComponent(project)}`;
|
||||
|
||||
const taskCtx = await new Listr<UpContext>(
|
||||
const taskCtx = await new Listr<UpContext, "default" | "simple">(
|
||||
[
|
||||
{
|
||||
title: "Read compose",
|
||||
@@ -796,7 +796,7 @@ export async function runUp(
|
||||
cwd,
|
||||
{
|
||||
progress: (message) => {
|
||||
task.output = message;
|
||||
if (task.output !== message) task.output = message;
|
||||
},
|
||||
service: (name) => {
|
||||
let stream: ReturnType<ListrTaskWrapper<UpContext, any, any>["stdout"]> | undefined;
|
||||
@@ -1071,7 +1071,13 @@ export async function runUp(
|
||||
},
|
||||
},
|
||||
],
|
||||
{ rendererOptions: { collapseErrors: false } },
|
||||
{
|
||||
// Build progress can remain queued across many polls. The default TTY
|
||||
// spinner redraws every child on every tick, which duplicates those
|
||||
// frames in captured terminal output. Simple emits only task events.
|
||||
renderer: build ? "simple" : "default",
|
||||
rendererOptions: { collapseErrors: false },
|
||||
},
|
||||
).run();
|
||||
|
||||
return taskCtx;
|
||||
|
||||
Reference in New Issue
Block a user