MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getPackageName

Function getPackageName

npm_modules/cli/src/utils/linuxDistro.ts:231–233  ·  view source on GitHub ↗
(packageMap: PackageNameMap, distro = detectLinuxDistro())

Source from the content-addressed store, hash-verified

229 * Uses type-safe indexing based on the LinuxDistroType enum
230 */
231export function getPackageName(packageMap: PackageNameMap, distro = detectLinuxDistro()): string {
232 return packageMap[distro.type] ?? packageMap.unknown;
233}
234
235/**
236 * Builds an install command for packages on the current distribution

Callers 4

getJavaInstallCommandMethod · 0.90
linuxSetupFunction · 0.90

Calls 1

detectLinuxDistroFunction · 0.85

Tested by

no test coverage detected