MCPcopy Create free account
hub / github.com/anomalyco/opencode / run

Function run

packages/http-recorder/script/verify-package.ts:7–11  ·  view source on GitHub ↗
(command: ReadonlyArray<string>, cwd: string)

Source from the content-addressed store, hash-verified

5import { pack } from "./pack.js"
6
7const run = async (command: ReadonlyArray<string>, cwd: string) => {
8 const process = Bun.spawn(command, { cwd, env: globalThis.process.env, stdout: "inherit", stderr: "inherit" })
9 const exitCode = await process.exited
10 if (exitCode !== 0) throw new Error(`${command.join(" ")} exited with code ${exitCode}`)
11}
12
13export const verifyPackage = async (archive: string) => {
14 const directory = await mkdtemp(path.join(tmpdir(), "http-recorder-consumer-"))

Callers 2

verifyPackageFunction · 0.70
runReplayFunction · 0.50

Calls 1

spawnMethod · 0.80

Tested by

no test coverage detected