File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
app/api/tasks/[taskId]/restart-dev Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { tasks } from '@/lib/db/schema'
44import { eq } from 'drizzle-orm'
55import { Sandbox } from '@vercel/sandbox'
66import { getServerSession } from '@/lib/session/get-server-session'
7- import { runCommandInSandbox , PROJECT_DIR } from '@/lib/sandbox/commands'
7+ import { runCommandInSandbox , runInProject , PROJECT_DIR } from '@/lib/sandbox/commands'
88import { detectPackageManager } from '@/lib/sandbox/package-manager'
99import { createTaskLogger } from '@/lib/utils/task-logger'
1010
@@ -45,7 +45,7 @@ export async function POST(_request: NextRequest, { params }: { params: Promise<
4545 const logger = createTaskLogger ( taskId )
4646
4747 // Check if package.json exists and has a dev script
48- const packageJsonCheck = await runCommandInSandbox ( sandbox , 'test' , [ '-f' , 'package.json' ] )
48+ const packageJsonCheck = await runInProject ( sandbox , 'test' , [ '-f' , 'package.json' ] )
4949 if ( ! packageJsonCheck . success ) {
5050 return NextResponse . json ( { error : 'No package.json found in sandbox' } , { status : 400 } )
5151 }
You can’t perform that action at this time.
0 commit comments