fix(cpa): more package manager detection improvements (#6566)
- Adjust package manager detection logic - Remove pnpm-lock.yaml from blank template
This commit is contained in:
@@ -18,11 +18,12 @@ export async function getPackageManager(args: {
|
||||
) {
|
||||
detected = 'pnpm'
|
||||
} else if (
|
||||
(cliArgs?.['--use-yarn'] && fse.existsSync(`${projectDir}/yarn.lock`)) ||
|
||||
cliArgs?.['--use-yarn'] ||
|
||||
fse.existsSync(`${projectDir}/yarn.lock`) ||
|
||||
(await commandExists('yarn'))
|
||||
) {
|
||||
detected = 'yarn'
|
||||
} else if (cliArgs?.['--use-npm'] && fse.existsSync(`${projectDir}/package-lock.json`)) {
|
||||
} else if (cliArgs?.['--use-npm'] || fse.existsSync(`${projectDir}/package-lock.json`)) {
|
||||
detected = 'npm'
|
||||
}
|
||||
return detected || 'npm'
|
||||
|
||||
7147
templates/blank-3.0/pnpm-lock.yaml
generated
7147
templates/blank-3.0/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user