Skip to content

Commit 24c55fe

Browse files
dhasani23David Hasani
andauthored
fix(amazonq): allow symlinks for JDK path (aws#5500)
## Problem Some users provide a symlink when QCT prompts them for a JDK path, and this previously was not being accepted. ## Solution Remove part of a conditional check (`isDirectory`, since that is always false for symlinks). This allows users to use symlinks, which will work fine during the local build. Even if someone provides a path that is *not* a directory now, the local build will fail and build error logs will open up for them to debug, as usual. --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license. Co-authored-by: David Hasani <[email protected]>
1 parent 8e34c5e commit 24c55fe

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Amazon Q Code Transformation: allow symlinks for JDK path"
4+
}

packages/core/src/amazonqGumby/chat/controller/controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,5 +568,5 @@ export class GumbyController {
568568
*/
569569
function extractPath(text: string): string | undefined {
570570
const resolvedPath = path.resolve(text.trim())
571-
return nodefs.existsSync(resolvedPath) && nodefs.lstatSync(resolvedPath).isDirectory() ? resolvedPath : undefined
571+
return nodefs.existsSync(resolvedPath) ? resolvedPath : undefined
572572
}

0 commit comments

Comments
 (0)