fix: Handle platform-specific subdirectories in Cursor server path detection #259
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.
Summary
Fixes #258
Extensions defined in
devcontainer.jsonare now correctly installed when using DevPod with Cursor IDE.Problem
Cursor installs its server binary to platform-specific subdirectories:
~/.cursor-server/bin/linux-x64/<commit>/bin/cursor-server~/.cursor-server/bin/linux-arm64/<commit>/bin/cursor-server~/.cursor-server/bin/darwin-x64/<commit>/bin/cursor-server~/.cursor-server/bin/darwin-arm64/<commit>/bin/cursor-serverDevPod's path detection in
findServerBinaryPath()was only checking for the direct path~/.cursor-server/bin/<commit>/bin/cursor-server, which doesn't exist.This caused the async extension installation process to fail silently - the process would start, but couldn't locate the cursor-server binary to run
--install-extensioncommands.Solution
Updated the Cursor path detection logic in
pkg/ide/vscode/vscode.go(lines 229-267) to:The fix tries the standard path first, then looks one level deeper for platform subdirectories if needed.
Testing
Tested on two platforms with different architectures:
AWS EC2 (Linux AMD64)
linux-x64/root/.cursor-server/bin/linux-x64/<commit>/bin/cursor-servermacOS Docker (Linux ARM64 container)
linux-arm64/root/.cursor-server/bin/linux-arm64/<commit>/bin/cursor-serverAll 9 extensions from
devcontainer.jsonnow install automatically in both environments.Impact
Related
Similar logic may be needed for other IDE flavors (Positron, Codium, Windsurf, Antigravity) if they exhibit similar platform-specific installation patterns, but I haven't observed this issue with those IDEs yet.