Skip to content

fix(amazonq): use user provided node runtime #5768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 2, 2025

Conversation

leigaol
Copy link
Contributor

@leigaol leigaol commented May 30, 2025

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

Screenshot 2025-05-30 at 1 06 31 PM Screenshot 2025-05-30 at 1 00 16 PM

Manually injected download failure / unzip failure of node, then I saw the alert, then I added my own node in settings, then it works.

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@leigaol leigaol requested review from a team as code owners May 30, 2025 19:35
@leigaol leigaol marked this pull request as draft May 30, 2025 19:35
@@ -372,7 +377,34 @@ private class AmazonQServerInstance(private val project: Project, private val cs
}

val node = if (SystemInfo.isWindows) "node.exe" else "node"
val cmd = NodeExePatcher.patch(artifact.resolve(node))
var nodePath = artifact.resolve(node)
// download node runtime if it is not found
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also search user PATH

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually we can just test if it works

ExecUtil.execAndGetOutput(GeneralCommandLine(node, "--version"))

or something

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in latest commit

@leigaol leigaol changed the title fix: use user provided node runtime fix(amazonq): use user provided node runtime May 30, 2025
@leigaol leigaol marked this pull request as ready for review May 30, 2025 23:59
project = project,
listOf(
NotificationAction.create(
message("codewhisperer.actions.open_settings.title")

Check warning

Code scanning / QDJVMC

Incorrect string capitalization Warning

String 'Open Settings' is not properly capitalized. It should have sentence capitalization
@leigaol
Copy link
Contributor Author

leigaol commented Jun 2, 2025

CI failure: :plugin-toolkit:jetbrains-rider:test

@rli rli merged commit 0c79959 into aws:feature/q-lsp-chat Jun 2, 2025
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants