| 233 | } |
| 234 | |
| 235 | const 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 | |
| 254 | const getBinary = () => { |
| 255 | const binaryName = getBinaryName() |