Skip to content

Commit a90104a

Browse files
committed
Revert "fix: enhance package manager resolution for pnpm in installation process"
This reverts commit e9dc869. AdminForth/1704/create-json-editor-plugin
1 parent e9dc869 commit a90104a

1 file changed

Lines changed: 1 addition & 20 deletions

File tree

adminforth/commands/createApp/utils.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -487,27 +487,8 @@ async function writeTemplateFiles(dirname, cwd, useNpm, includePrismaMigrations,
487487
}
488488
}
489489

490-
async function resolvePackageManagerCommand(packageManager) {
491-
if (packageManager !== 'pnpm') {
492-
return packageManager;
493-
}
494-
495-
try {
496-
await execAsync('pnpm --version', { env: process.env });
497-
return 'pnpm';
498-
} catch {
499-
try {
500-
await execAsync('corepack pnpm --version', { env: process.env });
501-
return 'corepack pnpm';
502-
} catch {
503-
throw new Error('pnpm is not available. Install pnpm globally or enable Corepack before creating a pnpm project.');
504-
}
505-
}
506-
}
507-
508490
async function installDependencies(ctx, cwd, packageManager) {
509-
const packageManagerCommand = await resolvePackageManagerCommand(packageManager);
510-
const command = `${packageManagerCommand} install`;
491+
const command = `${packageManager} install`;
511492

512493
await Promise.all([
513494
execAsync(command, { cwd, env: process.env }),

0 commit comments

Comments
 (0)