MCPcopy Index your code
hub / github.com/commitizen/cz-cli / getInstallCommand

Function getInstallCommand

src/commitizen/adapter.js:66–75  ·  view source on GitHub ↗
(packageManager)

Source from the content-addressed store, hash-verified

64 * Get specific install command for passed package manager
65 */
66function getInstallCommand(packageManager) {
67 const fallbackCommand = 'install';
68 const commandByPackageManager = {
69 npm: 'install',
70 yarn: 'add',
71 pnpm: 'add',
72 };
73
74 return commandByPackageManager[packageManager] || fallbackCommand;
75}
76
77/**
78 * Generates an npm install command given a map of strings and a package name

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected