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

Function execute

packages/core/src/git.ts:959–979  ·  view source on GitHub ↗
(cwd: string, proc: AppProcess.Interface)

Source from the content-addressed store, hash-verified

957}
958
959function execute(cwd: string, proc: AppProcess.Interface) {
960 return (args: string[]) =>
961 proc
962 .run(
963 ChildProcess.make("git", args, {
964 cwd,
965 extendEnv: true,
966 stdin: "ignore",
967 }),
968 )
969 .pipe(
970 Effect.map(
971 (result) =>
972 ({
973 exitCode: result.exitCode,
974 text: result.stdout.toString("utf8"),
975 stderr: result.stderr.toString("utf8"),
976 }) satisfies Result,
977 ),
978 )
979}
980
981function resolvePath(cwd: string, value: string) {
982 const trimmed = value.replace(/[\r\n]+$/, "")

Callers 2

git.tsFile · 0.70
runFunction · 0.70

Calls 2

runMethod · 0.45
makeMethod · 0.45

Tested by

no test coverage detected