MCPcopy Create free account
hub / github.com/alovajs/devtools / runCommand

Function runCommand

scripts/bump-version.ts:21–32  ·  view source on GitHub ↗
(command: string)

Source from the content-addressed store, hash-verified

19
20// Run the specified shell command
21function runCommand(command: string) {
22 return new Promise((resolve, reject) => {
23 const childProcess = exec(command, (error, stdout, stderr) => {
24 if (error) {
25 reject(error)
26 }
27 resolve(stdout || stderr)
28 })
29 childProcess.stdout?.pipe(process.stdout)
30 childProcess.stderr?.pipe(process.stderr)
31 })
32}
33
34async function main() {
35 // Ask questions and process answers

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected