MCPcopy
hub / github.com/serverless/serverless / run

Method run

packages/sf-core-installer/binary.js:194–220  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

192 }
193
194 run() {
195 const promise = !this.exists() ? this.install(true) : Promise.resolve()
196
197 promise
198 .then(() => {
199 const [, , ...args] = process.argv
200
201 const options = { cwd: process.cwd(), stdio: 'inherit' }
202
203 // Ignore SIGINT and SIGTERM so the child process handles them
204 // and exits gracefully
205 process.on('SIGINT', () => {})
206 process.on('SIGTERM', () => {})
207
208 const result = spawnSync(this.binaryPath, args, options)
209
210 if (result.error) {
211 error(result.error)
212 }
213
214 process.exit(result.status)
215 })
216 .catch((e) => {
217 error(e.message)
218 process.exit(1)
219 })
220 }
221}
222
223const getOS = () => {

Callers 1

runFunction · 0.45

Calls 4

existsMethod · 0.95
installMethod · 0.95
resolveMethod · 0.80
errorFunction · 0.70

Tested by

no test coverage detected