aws / aws-toolkit-vscode

Amazon Q, CodeCatalyst, Local Lambda debug, SAM/CFN syntax, ECS Terminal, AWS resources
https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.amazon-q-vscode
Apache License 2.0
1.52k stars 447 forks source link

fix(amazonq): skip indexing when no workspace folders are found #6058

Closed jpinkney-aws closed 5 days ago

jpinkney-aws commented 5 days ago

Problem

If customers open a workspace without a workspace folder they get:

2024-11-19 10:49:16.189 [error] Error: No workspace folders found
    at k (/Users/myuser/.vscode/extensions/amazonwebservices.amazon-q-vscode-99.0.0-g3afd54d/dist/src/extensionNode.js:5464:5562)
    at L.buildIndex (/Users/myuser/.vscode/extensions/amazonwebservices.amazon-q-vscode-99.0.0-g3afd54d/dist/src/extensionNode.js:5464:9890)
    at Immediate.<anonymous> (/Users/myuser/.vscode/extensions/amazonwebservices.amazon-q-vscode-99.0.0-g3afd54d/dist/src/extensionNode.js:5464:11854)

because workspace indexing is throwing an error

Solution

Log that no workspace folders were found so indexing is skipped


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