MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / determineInstallCommand

Function determineInstallCommand

lib/utilities/package-managers.js:5–13  ·  view source on GitHub ↗
(projectRoot)

Source from the content-addressed store, hash-verified

3const fs = require('fs');
4
5async function determineInstallCommand(projectRoot) {
6 if (await isPnpmProject(projectRoot)) {
7 return 'pnpm install';
8 } else if (isYarnProject(projectRoot)) {
9 return 'yarn install';
10 } else {
11 return 'npm install';
12 }
13}
14
15async function isPnpmProject(projectRoot) {
16 if (fs.existsSync(`${projectRoot}/pnpm-lock.yaml`)) {

Callers 2

runFunction · 0.85
validateAndRunFunction · 0.85

Calls 2

isPnpmProjectFunction · 0.85
isYarnProjectFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…