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

Function cmd

packages/opencode/src/tool/shell.ts:293–310  ·  view source on GitHub ↗
(shell: string, command: string, cwd: string, env: NodeJS.ProcessEnv)

Source from the content-addressed store, hash-verified

291})
292
293function cmd(shell: string, command: string, cwd: string, env: NodeJS.ProcessEnv) {
294 if (process.platform === "win32" && Shell.ps(shell)) {
295 return ChildProcess.make(shell, ["-NoLogo", "-NoProfile", "-NonInteractive", "-Command", command], {
296 cwd,
297 env,
298 stdin: "ignore",
299 detached: false,
300 })
301 }
302
303 return ChildProcess.make(command, [], {
304 shell,
305 cwd,
306 env,
307 stdin: "ignore",
308 detached: process.platform !== "win32",
309 })
310}
311const parser = lazy(async () => {
312 const { Parser } = await import("web-tree-sitter")
313 const { default: treeWasm } = await import("web-tree-sitter/tree-sitter.wasm" as string, {

Callers 1

shell.tsFile · 0.70

Calls 1

makeMethod · 0.45

Tested by

no test coverage detected