diff --git a/src/commands/src/helpers/dependency-helpers.ts b/src/commands/src/helpers/dependency-helpers.ts index c733d186a..fce60dbf1 100644 --- a/src/commands/src/helpers/dependency-helpers.ts +++ b/src/commands/src/helpers/dependency-helpers.ts @@ -47,14 +47,19 @@ export async function prepareBuildAndGetDependencies(repoName: string, projectNa createEnvProdFile(repoDir, projectName, baseUrl), ]; - const dependencies = await Promise.all(commandPromises); - - return { - commitHash: dependencies[0] as string, - commitBranch: dependencies[1] as string, - patchId: dependencies[2] as string | undefined, - hasRedirects: dependencies[3] as boolean, - bundlePath: `${repoDir}/bundle.zip`, - repoDir, - }; + try { + const dependencies = await Promise.all(commandPromises); + + return { + commitHash: dependencies[0] as string, + commitBranch: dependencies[1] as string, + patchId: dependencies[2] as string | undefined, + hasRedirects: dependencies[3] as boolean, + bundlePath: `${repoDir}/bundle.zip`, + repoDir, + }; + } catch (error) { + console.error('ERROR! Could not get build dependencies'); + throw error; + } }