effect(core): track stderr truncation; polish AppProcess callers (#27353)

This commit is contained in:
Kit Langton
2026-05-13 20:31:03 -04:00
committed by GitHub
parent ccb207f946
commit 42e6b7d541
5 changed files with 30 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
import { Effect, Layer, Schema, Context, Stream } from "effect"
import { FetchHttpClient, HttpClient, HttpClientRequest, HttpClientResponse } from "effect/unstable/http"
import { withTransientReadRetry } from "@/util/effect-http-client"
import { errorMessage } from "@/util/error"
import { ChildProcess } from "effect/unstable/process"
import { AppProcess } from "@opencode-ai/core/process"
import path from "path"
@@ -124,7 +125,7 @@ export const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProce
stderr: result.stderr.toString("utf8"),
}
},
Effect.catch(() => Effect.succeed({ code: 1, stdout: "", stderr: "" })),
Effect.catch((err) => Effect.succeed({ code: 1, stdout: "", stderr: errorMessage(err) })),
)
const getBrewFormula = Effect.fnUntraced(function* () {