MCPcopy
hub / github.com/serverless/serverless / getBinaryName

Function getBinaryName

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

Source from the content-addressed store, hash-verified

233}
234
235const getBinaryName = () => {
236 const osType = getOS()
237 let architecture = os.arch()
238
239 if (architecture !== 'arm64' && architecture !== 'x64') {
240 console.error(`Architecture ${architecture} is not supported.`)
241 process.exit(1)
242 } else if (architecture === 'arm64' && osType === 'windows') {
243 console.error(`Platform ${osType} - ${architecture} is not supported.`)
244 process.exit(1)
245 }
246
247 if (architecture === 'x64') {
248 architecture = 'amd64'
249 }
250
251 return `serverless-${osType}-${architecture}`
252}
253
254const getBinary = () => {
255 const binaryName = getBinaryName()

Callers 1

getBinaryFunction · 0.70

Calls 2

getOSFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…