From b857786516bede8dc0e9eb7d1fb2335cc6a10c79 Mon Sep 17 00:00:00 2001 From: Thanh Trinh Date: Wed, 5 Aug 2026 08:33:46 -0500 Subject: [PATCH] fix: always install selected task dependencies Co-authored-by: Codex --- src/app/api/install-deps/route.ts | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/app/api/install-deps/route.ts b/src/app/api/install-deps/route.ts index 3a7b8d6..2c7ef3d 100644 --- a/src/app/api/install-deps/route.ts +++ b/src/app/api/install-deps/route.ts @@ -21,7 +21,7 @@ const pathExists = async (targetPath: string) => { export async function POST(req: NextRequest) { try { const json = await req.json(); - const { network, upgradeId, forceInstall } = json; + const { network, upgradeId } = json; if (!network || !upgradeId) { return NextResponse.json( @@ -31,7 +31,6 @@ export async function POST(req: NextRequest) { } const actualNetwork = network.toLowerCase(); - const shouldForceInstall = Boolean(forceInstall); const safePathPattern = /^[a-zA-Z0-9_-]+$/; if (!safePathPattern.test(actualNetwork) || !safePathPattern.test(upgradeId)) { @@ -67,24 +66,6 @@ export async function POST(req: NextRequest) { ); } - const libExistsBeforeInstall = await pathExists(libPath); - - if (!shouldForceInstall && libExistsBeforeInstall) { - console.log(`Deps already installed for ${actualNetwork}/${upgradeId}; skipping.`); - return NextResponse.json( - { - success: true, - message: `Dependencies already installed for ${actualNetwork}/${upgradeId}`, - libExists: true, - installed: false, - depsInstalled: false, - stdout: '', - stderr: '', - }, - { status: 200 } - ); - } - console.log( `Installing dependencies for ${actualNetwork}/${upgradeId} (cwd: ${resolvedUpgradePath})` );