getcursor / cursor

The AI Code Editor
https://cursor.com
23.92k stars 1.5k forks source link

cursor breaks launching of vscode from terminal on Windows and WSL #1238

Open JasonGross opened 7 months ago

JasonGross commented 7 months ago

When installing cursor on Windows 10, I instructed it to only allow me to open it with cursor from the command line. But it has clobbered the path to vscode, and when I type code from cmd or from wsl shell, it tries to open cursor instead. (And fails in WSL, due to #870)

lesmo commented 7 months ago

This is because Cursor is just naively adding the /bin dir to the System PATH:

C:\Users\lesmo\AppData\Local\Programs\cursor\resources\app\bin

This folder contains cursor and code binaries, which are overriding VS Code. This is wrong, Cursor should be adding itself to the User PATH, not System PATH (Cursor devs please take note).

To fix this, the VS Code path must be set before Cursor. I recommend removing Cursor from the System PATH, and adding it at the end of the User PATH. If you want to replace Code with Cursor, just remove Code from the PATH.

image

WSL is broken because the script used by Cursor is the one used for *NIX environments, so it's not prepared to handle WSL. You can check my workaround here.

tmm1 commented 1 week ago

WSL is broken because the script used by Cursor is the one used for *NIX environments, so it's not prepared to handle WSL.

This issue has been resolved in the 0.41.1 release