Skip to content

Commit

Permalink
fix: multiple prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoRCD committed Mar 31, 2024
1 parent ccaead4 commit 62c0718
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/app/server/database/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ model Project {
projectManager String?
homepage String?
variablePrefix String?
avatar String? @default("https://i.imgur.com/6VBx3io.png") @db.VarChar(500)
avatar String? @db.VarChar(500)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
ownerId Int
Expand Down
9 changes: 1 addition & 8 deletions apps/cli/src/commands/create.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { defineCommand } from 'citty'
import consola from 'consola'
import { createProject } from '../utils/projects.ts'
import { suggestLinkProject } from '../utils/suggest.ts'

export default defineCommand({
meta: {
Expand All @@ -21,13 +20,7 @@ export default defineCommand({
const name = ctx.args.name
consola.start(`Creating project ${ name }...`)
try {
let project = await createProject(name)
consola.success(`Project ${ name } created successfully!`)
const linkedProject = await suggestLinkProject(name)
if (linkedProject) {
project = linkedProject
}
return project
return await createProject(name)
} catch (e) {
consola.error('Failed to create project')
}
Expand Down

0 comments on commit 62c0718

Please sign in to comment.