-
Notifications
You must be signed in to change notification settings - Fork 36.8k
fix: correct tunnel command path resolution for Windows Insiders #282431
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
base: main
Are you sure you want to change the base?
fix: correct tunnel command path resolution for Windows Insiders #282431
Conversation
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @bpaseroMatched files:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes the tunnel command path resolution for Windows Insiders builds, addressing ENOENT errors that occur when port forwarding after updates.
Key Changes:
- Added special case for Windows Insiders to navigate up two directory levels from
process.execPathto find thebin/folder at root level - Refactored the
appPathlogic to use explicit conditionals instead of a ternary operator for better clarity
deepak1556
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR but I don't think the following code path is triggering the issue, both Code - Insiders.exe and bin are at the same root level.
|
The fix needs to happen here vscode/extensions/tunnel-forwarding/src/extension.ts Lines 26 to 30 in 55ca409
|
3309280 to
3eb1d5e
Compare
|
Thanks @deepak1556 for pointing out the correct location! I've updated the PR to apply the fix in |
3eb1d5e to
10682b2
Compare
On Windows Insiders, the bin folder is at root level while appRoot points to resources/app inside the versioned folder. Changed path resolution to use '../../../bin' (3 levels up) for Windows Insiders specifically, while keeping '../../bin' for other platforms. - macOS: 'bin' (directly under appRoot) - Windows Insiders: '../../../bin' (resources/app -> root/bin) - Other platforms: '../../bin' Fixes microsoft#282425
10682b2 to
4a2f4b2
Compare
|
Updated the PR based on @deepak1556's feedback:
The key insight is that Path analysis: |
|
Apologies for the messy commit history earlier - I had some confusion about the correct path resolution. The PR should now be clean with just the single correct fix. Thanks for your patience! 🙏 |
| : process.platform === 'win32' && vscode.env.appQuality !== 'stable' | ||
| ? '../../../bin' // Windows Insiders: resources/app -> root/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| : process.platform === 'win32' && vscode.env.appQuality !== 'stable' | |
| ? '../../../bin' // Windows Insiders: resources/app -> root/bin | |
| : process.platform === 'win32' && vscode.env.appQuality === 'insider' | |
| ? '../../../bin' // TODO: remove as part of https://github.com/microsoft/vscode/issues/282514 |
Description
This PR fixes the port forwarding issue on Windows Insiders where the tunnel command fails with ENOENT error after updates.
The Problem
On Windows Insiders, the folder structure after updates is:
The current code uses
../../binwhich resolves to<version>/bin(doesn't exist!).The correct path should be
../../../binto reachroot/bin.The Fix
Added platform-specific path resolution in
extensions/tunnel-forwarding/src/extension.ts:bin(directly under appRoot)../../../bin(3 levels up: resources/app → root/bin)../../bin(unchanged)Path Analysis
Fixes #282425