MCPcopy
hub / github.com/prisma/prisma / computeLibSSLSpecificPaths

Function computeLibSSLSpecificPaths

packages/get-platform/src/getPlatform.ts:299–321  ·  view source on GitHub ↗
(args: ComputeLibSSLSpecificPathsParams)

Source from the content-addressed store, hash-verified

297}
298
299export function computeLibSSLSpecificPaths(args: ComputeLibSSLSpecificPathsParams) {
300 return match(args)
301 .with({ familyDistro: 'musl' }, () => {
302 /* Linux Alpine */
303 debug('Trying platform-specific paths for "alpine"')
304 return ['/lib', '/usr/lib']
305 })
306 .with({ familyDistro: 'debian' }, ({ archFromUname }) => {
307 /* Linux Debian, Ubuntu, etc */
308 debug('Trying platform-specific paths for "debian" (and "ubuntu")')
309 return [`/usr/lib/${archFromUname}-linux-gnu`, `/lib/${archFromUname}-linux-gnu`]
310 })
311 .with({ familyDistro: 'rhel' }, () => {
312 /* Linux Red Hat, OpenSuse etc */
313 debug('Trying platform-specific paths for "rhel"')
314 return ['/lib64', '/usr/lib64']
315 })
316 .otherwise(({ familyDistro, arch, archFromUname }) => {
317 /* Other Linux distros, we don't do anything specific and fall back to the next blocks */
318 debug(`Don't know any platform-specific paths for "${familyDistro}" on ${arch} (${archFromUname})`)
319 return []
320 })
321}
322
323type GetOpenSSLVersionResult =
324 | {

Callers 2

getosFunction · 0.85

Calls 2

debugFunction · 0.85
withMethod · 0.65

Tested by

no test coverage detected