MCPcopy Create free account
hub / github.com/Power-Playground/app / execa

Function execa

scripts/bootstrap.mjs:10–23  ·  view source on GitHub ↗
(command, argvs = [], options = defaultOptions)

Source from the content-addressed store, hash-verified

8}
9
10function execa(command, argvs = [], options = defaultOptions) {
11 return new Promise((resolve, reject) => {
12 const cp = child_process.spawn(command, argvs, options)
13 cp.on('error', reject)
14 cp.on('close', (code) => {
15 if (code !== 0) {
16 const error = new Error(`Command failed with exit code ${code}`)
17 reject(error)
18 } else {
19 resolve()
20 }
21 })
22 })
23}
24
25async function main() {
26 await execa('pnpm', ['install'])

Callers 1

mainFunction · 0.85

Calls 2

rejectFunction · 0.85
onMethod · 0.80

Tested by

no test coverage detected