Cursor Symlinks disrupting both Code and Cursor commands

So I can point directly to executables. But this symlink still appears. How can I get rid of it? There is no apps folder within resources of cursor. Seems like a bug, but the symlinks make me unable to fix it.

another user with the exact same issue and the exact same way of reproducing it.

3 Likes

Did you find any fix to this?

1 Like
  • For VS code command to work reorder the “code” command above the “cursor” command in your system environment variables.

  • For Cursor :

I just updated the cursor file which is located in the path “/c/Users/pc_username/AppData/Local/Programs/cursor/resources/app/bin/”

  • removed /… from VSCODE_PATH variable
  • updated last variables to be:
ELECTRON="$VSCODE_PATH/cursor.cmd"
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" --ms-enable-electron-run-as-node "$@"
exit $?

can you pls explain in detail?

Hello Hari,
Which part do you want me to explain?

For Windows code symlink:
There are 2 (maybe more can work) ways that worked for me -
A.

  1. Go here and remove all the files named code:
    c:\Users\<username>\AppData\Local\Programs\cursor\resources\app\bin
  2. Restart your terminal

B. As @a-hussien mentioned,
“Move up” your VScode path upon the cursor path on the environment variables’ Path table:
image

In my case, the VScode path was inside the “user Path variables” table, and the cursor path was inside the “system Path variables” table. I added the VScode path (copied from the “user…table”) to the “system…table” and moved it up.

If we’re in the same boat, now, you have a choice to make.
Either take both to the same table and reorder, or delete one from one table and add to the other.

However, be careful, system Path variables get higher priority over user Path variables!

Some ref:

Please fix this for WSL as well or i would say Linux in general

Hello, I tried your method and put cursor and VSCODE into the system environment variable with VSCODE on it. But I still report an error:

hint: Waiting for your editor to close the file... Unable to determine app path from symlink : /c/Users/xxx/AppData/Local/Programs/cursor/resources/app/bin/code
error: There was a problem with the editor 'code --wait'.

Is there any better way to solve this please? Thank you so much!

You can easily fix the code . extension for VS Code by changing the order of your paths in your $PATH environment variable. Ensure that VS Code is before cursor, and that you add “” when exporting the updated path in WSL.