getcursor / cursor

The AI Code Editor
https://cursor.com
24.09k stars 1.51k forks source link

CODE and CURSOR command creation overriding VSC #1216

Open emilrueh opened 8 months ago

emilrueh commented 8 months ago

Your suggested feature of creating either the code command OR the cursor command will entirely override the VSC command code from the path DESPITE only having selected the cursor command!

Furthermore your uninstalling option of the command DID NOT UNINSTALL the cursor command even after restarting the system.

I'm on Windows 11 but the same happened on 10 a few weeks back.

Elyx0 commented 8 months ago

Same problem: $ code .bashrc Unable to determine app path from symlink : /c/Users/me/AppData/Local/Programs/cursor/resources/app/bin/code

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

lesmo commented 7 months ago

Same problem: $ code .bashrc Unable to determine app path from symlink : /c/Users/me/AppData/Local/Programs/cursor/resources/app/bin/code

This is a different problem and probably should have its own issue.

Cursor is shipping with the same CLI script it uses for *NIX, which is not prepared to work with WSL. I couldn't find a workaround, so right now you'll need to go through Cursor, switch to WSL and then open your folder.

lesmo commented 7 months ago

I couldn't find a workaround, so right now you'll need to go through Cursor, switch to WSL and then open your folder.

I managed to figure out a functional workaround. You can find it here.

honeymaro commented 4 weeks ago

I'm surprised the issue hasn't been resolved yet.

jbellmore commented 3 weeks ago

This is extremely frustrating and pretty unacceptable, installing Cursor just to try it out completely breaks VS Code opening from WSL requiring completing uninstalling and reinstalling VS Code.

Overriding another app's functionality is completely unacceptable.

It is unfortunate because this completely prevents using this on anything but personal projects and makes it impossible to recommend to any serious company.

fabricioCraft commented 2 weeks 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

Thank you so much man! That worked 100%

MichaelJGW commented 1 week ago

I just removed the code and code.cmd files from the bin folder /mnt/c/Users/Michael/AppData/Local/Programs/cursor/resources/app/bin/code the command code is pointing to VSCode again.