Skip to content

Commit

Permalink
fix(wb): make prisma command show an error if no prisma project found
Browse files Browse the repository at this point in the history
  • Loading branch information
exKAZUu committed Mar 6, 2024
1 parent 9163e02 commit 89a8986
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/wb/src/commands/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,12 @@ async function findPrismaProjects(argv: EnvReaderOptions): Promise<Project[]> {
process.exit(1);
}

return projects.all.filter(
const filtered = projects.all.filter(
(project) => project.packageJson.dependencies?.['prisma'] || project.packageJson.devDependencies?.['prisma']
);
if (filtered.length === 0) {
console.error(chalk.red('No prisma project found.'));
process.exit(1);
}
return filtered;
}

0 comments on commit 89a8986

Please sign in to comment.