From cbdf1db52d393f3132dca7e398e726f95f410a67 Mon Sep 17 00:00:00 2001 From: David Hasani Date: Mon, 26 Aug 2024 12:59:10 -0700 Subject: [PATCH] gradle script update --- .../core/src/amazonqGumby/chat/controller/controller.ts | 2 +- .../core/src/codewhisperer/commands/startTransformByQ.ts | 4 +++- .../service/transformByQ/transformMavenHandler.ts | 7 +------ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/core/src/amazonqGumby/chat/controller/controller.ts b/packages/core/src/amazonqGumby/chat/controller/controller.ts index e48b56119a0..baefc4bb268 100644 --- a/packages/core/src/amazonqGumby/chat/controller/controller.ts +++ b/packages/core/src/amazonqGumby/chat/controller/controller.ts @@ -539,5 +539,5 @@ export class GumbyController { */ function extractPath(text: string): string | undefined { const resolvedPath = path.resolve(text.trim()) - return fs.existsSync(resolvedPath) && fs.lstatSync(resolvedPath).isDirectory() ? resolvedPath : undefined + return fs.existsSync(resolvedPath) ? resolvedPath : undefined } diff --git a/packages/core/src/codewhisperer/commands/startTransformByQ.ts b/packages/core/src/codewhisperer/commands/startTransformByQ.ts index 651db45536f..53ac39949c3 100644 --- a/packages/core/src/codewhisperer/commands/startTransformByQ.ts +++ b/packages/core/src/codewhisperer/commands/startTransformByQ.ts @@ -165,7 +165,9 @@ export async function compileProject() { } await prepareProjectDependencies(dependenciesFolder, transformByQState.getProjectPath()) } catch (err) { - getLogger().error('CodeTransformation: compileProject failed due to: ' + err) + getLogger().error( + `CodeTransformation: compileProject with ${transformByQState.getBuildSystem()} failed due to: ` + err + ) throw err } } diff --git a/packages/core/src/codewhisperer/service/transformByQ/transformMavenHandler.ts b/packages/core/src/codewhisperer/service/transformByQ/transformMavenHandler.ts index ce4ec796022..33e3a0de352 100644 --- a/packages/core/src/codewhisperer/service/transformByQ/transformMavenHandler.ts +++ b/packages/core/src/codewhisperer/service/transformByQ/transformMavenHandler.ts @@ -157,12 +157,7 @@ export async function prepareProjectDependencies(dependenciesFolder: FolderInfo // dependenciesFolder always exists for Maven await prepareMavenProjectDependencies(dependenciesFolder!, projectPath) } else if (transformByQState.getBuildSystem() === BuildSystem.Gradle) { - try { - await prepareGradleProjectDependencies() - } catch (err) { - getLogger().info('CodeTransformation: gradle_copy_deps.py failed, terminating the transformation job') - throw err - } + await prepareGradleProjectDependencies() } }