Skip to content

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
masterfrom
fix/issue-32/add-path-resolution-for-the-vscode-commit-hash-directory
Open

Fix ENOENT error with the new VScode commit hash directory for Windows built in extensions in WSL#33
yCodeTech wants to merge 1 commit into
masterfrom
fix/issue-32/add-path-resolution-for-the-vscode-commit-hash-directory

Conversation

@yCodeTech
Copy link
Copy Markdown
Owner

@yCodeTech yCodeTech commented Jun 2, 2026

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:

  • Added logic in ExtensionData to 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.
  • Added error handling and user notification for failures to resolve the built-in extensions path, including logging and a one-time warning message with an option to open the output channel.
  • Introduced new constructor options and internal flags in ExtensionData to control whether discovery path failures should notify the user, preventing duplicate warnings from multiple instances.

Integration and usage updates:

  • Updated the extension activation in extension.ts to pass the new constructor parameter, enabling user notification for the main extension instance only.
  • Updated Configuration logic to handle cases where the Windows extensions paths are not resolved, preventing errors by falling back to empty arrays.

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.
@yCodeTech yCodeTech added bug Something isn't working enhancement New feature or quality of life enhancement WSL2 Windows Linux (WSL2) labels Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or quality of life enhancement WSL2 Windows Linux (WSL2)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Activating extension failed

1 participant