-
Notifications
You must be signed in to change notification settings - Fork 31
Fix Windows IDE Detection #297
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
Open
agrasth
wants to merge
10
commits into
jfrog:main
Choose a base branch
from
agrasth:windows-ide-path-fix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
- Added 5 detection paths for VSCode (previously 2) - Added 4 detection paths for Cursor (previously 2) - Added 4 detection paths for Windsurf (previously 2) - Improved error messages with Windows-specific instructions - Fixed issue where IDEs installed in non-standard locations were not detected This fixes the 'installation not found' error reported by Windows users.
Use os.Getenv() to manually expand Windows environment variables instead of relying on os.ExpandEnv() which can be unreliable with %VAR% syntax on Windows systems. This matches the approach from the original working implementation and should fix the 'installation not found' error on Windows.
Changed debug logs to info logs for easier visibility without -v flag. This will help diagnose why IDE detection is failing on Windows by showing: - All paths being checked - Environment variable values (LOCALAPPDATA, PROGRAMFILES, etc.) - Expanded paths after variable substitution - Whether each path exists or not
Removed temporary debug/info logging that was used to diagnose the Windows path detection issue. The core fix (using os.Getenv() for Windows environment variables) is working correctly. Tested and verified on Windows - Cursor detection successful.
Shortened manual setup and permission error messages since auto-detection now works correctly. These are rare fallback messages so keeping them brief.
Added missing Linux detection paths from original implementation: - Snap install path: /snap/code/current/usr/share/code/resources/app - VSCode Server path: ~/.vscode-server/bin/*/resources/app (with glob support) Also added glob pattern support in detectInstallation() to handle wildcard paths like vscode-server installations.
- Updated setup.go with comprehensive description including all supported IDEs - Added practical examples for VSCode, Cursor, and direct URL usage - Removed unused setup/help.go file (was shadowed by setup.go) The help now clearly shows all supported IDEs (vscode, cursor, windsurf, jetbrains) with example commands for each.
Moved from: ide/docs/setup.go (package docs) To: ide/docs/setup/help.go (package setup) This matches the pattern used throughout the repo: - docs/<command-name>/help.go - package <command-name> Updated import in cli.go from 'ide/docs' to 'ide/docs/setup'
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.
Fix Windows IDE Detection for VSCode, Cursor, and Windsurf
Problem
IDE detection failed on Windows with error: "installation not found in standard locations"
Solution
os.Getenv()to manually expand Windows environment variablesChanges
Files Modified:
vscode_fork.go- Fixed environment variable expansion, added glob supportvscode_fork_registry.go- Added Windows and Linux detection pathsinstructions.go- Simplified error messages