(args: ComputeLibSSLSpecificPathsParams)
| 297 | } |
| 298 | |
| 299 | export 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 | |
| 323 | type GetOpenSSLVersionResult = |
| 324 | | { |
no test coverage detected