MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / runCommand

Function runCommand

cli/src/utils/open-file.ts:103–125  ·  view source on GitHub ↗
(command: string)

Source from the content-addressed store, hash-verified

101}
102
103const runCommand = async (command: string): Promise<boolean> => {
104 return new Promise((resolve) => {
105 const child = spawn(command, {
106 shell: true,
107 stdio: 'ignore',
108 detached: true,
109 })
110
111 child.on('error', () => {
112 resolve(false)
113 })
114
115 child.on('close', (code) => {
116 resolve(code === 0)
117 })
118
119 try {
120 child.unref()
121 } catch {
122 // noop
123 }
124 })
125}
126
127export const openFileAtPath = async (
128 filePath: string,

Callers 1

openFileAtPathFunction · 0.70

Calls 2

resolveFunction · 0.70
onMethod · 0.65

Tested by

no test coverage detected