MCPcopy Create free account
hub / github.com/vercel/vercel / validateBuildArch

Function validateBuildArch

packages/python/src/platform-info.ts:81–93  ·  view source on GitHub ↗
(arch: string)

Source from the content-addressed store, hash-verified

79
80/** Validate and normalize a VERCEL_BUILD_ARCH value. */
81export function validateBuildArch(arch: string): 'x86_64' | 'aarch64' {
82 switch (arch.toLowerCase()) {
83 case 'x86_64':
84 return 'x86_64';
85 case 'aarch64':
86 return 'aarch64';
87 default:
88 throw new NowBuildError({
89 code: 'INVALID_BUILD_ARCH',
90 message: `Unrecognized VERCEL_BUILD_ARCH "${arch}". Expected "x86_64" or "aarch64".`,
91 });
92 }
93}
94
95/**
96 * Return platform info for the Lambda runtime target.

Callers 3

archToUvPlatformFunction · 0.90
archToLambdaArchFunction · 0.90
detectTargetPlatformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected