Fix ENOENT error with the new VScode commit hash directory for Windows built in extensions in WSL#33
Open
yCodeTech wants to merge 1 commit into
Conversation
Fixes #32. - Implemented logic to resolve the Windows built-in extensions path while running in WSL, accommodating both legacy and commit-hash directory structures. - Updated `ExtensionData` constructor to allow notification of discovery path failures only when the root extension file called it. - Enhanced error handling and logging for path resolution failures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves the way the extension discovers and handles the Windows built-in extensions path when running inside WSL (Windows Subsystem for Linux). It introduces robust detection logic to support both legacy and new VS Code installation paths, adds error handling and user notifications for failures, and ensures that discovery failures are only surfaced once per session/activation.
Fixes #32.
Windows built-in extensions path resolution improvements:
ExtensionDatato detect both the legacy and new hashed commit-based install paths for built-in extensions under WSL, including directory scanning and caching of results to avoid repeated disk access.ExtensionDatato control whether discovery path failures should notify the user, preventing duplicate warnings from multiple instances.Integration and usage updates:
extension.tsto pass the new constructor parameter, enabling user notification for the main extension instance only.Configurationlogic to handle cases where the Windows extensions paths are not resolved, preventing errors by falling back to empty arrays.