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

Function detectTargetPlatform

packages/python/src/platform-info.ts:102–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100 * Respects `VERCEL_BUILD_ARCH` for architecture overrides.
101 */
102export function detectTargetPlatform(): PlatformInfo {
103 if (process.env.VERCEL_BUILD_IMAGE && process.platform === 'linux') {
104 return detectPlatform();
105 }
106
107 const arch = process.env.VERCEL_BUILD_ARCH;
108
109 const platform: PlatformInfo = {
110 osName: 'manylinux',
111 archName: 'x86_64',
112 osMajor: 2,
113 osMinor: 17,
114 os: 'linux',
115 sysPlatform: 'linux',
116 libc: 'gnu',
117 };
118
119 if (arch) {
120 platform.archName = validateBuildArch(arch);
121 }
122
123 return platform;
124}

Calls 2

detectPlatformFunction · 0.85
validateBuildArchFunction · 0.85

Tested by

no test coverage detected