MCPcopy Index your code
hub / github.com/anomalyco/opencode / fail

Function fail

packages/opencode/src/git/index.ts:22–29  ·  view source on GitHub ↗
(err: unknown)

Source from the content-addressed store, hash-verified

20const out = (result: { text(): string }) => result.text().trim()
21const nuls = (text: string) => text.split("\0").filter(Boolean)
22const fail = (err: unknown) =>
23 ({
24 exitCode: 1,
25 text: () => "",
26 stdout: Buffer.alloc(0),
27 stderr: Buffer.from(err instanceof Error ? err.message : String(err)),
28 truncated: false,
29 }) satisfies Result
30
31export type Kind = "added" | "deleted" | "modified"
32

Callers 1

index.tsFile · 0.70

Calls 1

fromMethod · 0.45

Tested by

no test coverage detected