Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
fix(cli): null project data bug in install command
Browse files Browse the repository at this point in the history
productdevbook committed Dec 4, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 4194a93 commit c9c586a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/cli/src/commands/install.ts
Original file line number Diff line number Diff line change
@@ -40,7 +40,14 @@ export default defineCommand({
const devDependencies: Set<string> = new Set()

for (const [_moduleName, moduleData] of Object.entries(selectProject)) {
if (!moduleData)
continue

for (const [_projectName, projectData] of Object.entries(moduleData)) {
if (!projectData) {
consola.error(`No project data found for ${_projectName}`)
continue
}
if (projectData.packageJson) {
if (projectData.packageJson.dependencies) {
const deps = projectData.packageJson.dependencies.split(',').map(item => item.trim())

0 comments on commit c9c586a

Please sign in to comment.