chore: add temporary P2 child debug channel for acceptance diagnosis
This commit is contained in:
@@ -427,7 +427,13 @@ export class WorkspacePreprocessingService {
|
||||
|
||||
private async runJsonStage(runtime: ActiveRuntime, argv: string[]): Promise<Record<string, unknown>> {
|
||||
const result = await this.deps.runChild({ argv, configPath: runtime.configLease.path });
|
||||
if (result.exitCode !== 0) throw new Error("workspace child failed");
|
||||
if (result.exitCode !== 0) {
|
||||
if (process.env.P2_CHILD_DEBUG === "1") {
|
||||
const detail = `${result.stderr ?? ""}${result.stdout ?? ""}`.replace(/[\r\n]+/g, " ").slice(0, 2048);
|
||||
throw new Error(`workspace child failed: ${detail}`);
|
||||
}
|
||||
throw new Error("workspace child failed");
|
||||
}
|
||||
return JSON.parse(result.stdout) as Record<string, unknown>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user