MCPcopy
hub / github.com/blitz-js/blitz / run

Function run

packages/blitz-next/scripts/postinstall.js:112–133  ·  view source on GitHub ↗
(cmd, params, cwd = process.cwd(), stdio = ["pipe", "inherit", "inherit"])

Source from the content-addressed store, hash-verified

110 }
111
112 function run(cmd, params, cwd = process.cwd(), stdio = ["pipe", "inherit", "inherit"]) {
113 const child = childProcess.spawn(cmd, params, {
114 stdio,
115 cwd,
116 })
117
118 return new Promise((resolve, reject) => {
119 child.on("close", () => {
120 resolve()
121 })
122 child.on("exit", (code) => {
123 if (code === 0) {
124 resolve()
125 } else {
126 reject(code)
127 }
128 })
129 child.on("error", () => {
130 reject()
131 })
132 })
133 }
134
135 async function findNodeModulesRoot(src) {
136 let root

Callers 2

mainFunction · 0.70
isInstalledGloballyFunction · 0.70

Calls 1

onMethod · 0.45

Tested by

no test coverage detected