Can not using "code" or "cursor" command to open folder

I installed Cursor and was allowed to “install cursor command” but when I try to open with the “cursor” command in the terminal it does not work.
Unfortunately, the “code” command to open with VS code doesn’t work either, Is it a conflict when I installed the “cursor” command? How can I resolve that?

This is the error when running “code .”

Unable to determine app path from symlink: /c/Users/admin/AppData/Local/Programs/cursor/resources/app/bin/code

This is the error when running “cursor .”

/c/Users/admin/AppData/Local/Programs/cursor/resources/app/bin/cursor: line 62: /c/Users/admin/AppData/Local/Programs/cursor/resources/app/bin/…/cursor: No such file or directory

3 Likes

Delete the code and code.cmd files from /AppData/Local/Programs/cursor/resources/app/bin/
then edit cursor near the bottom

if [ ! -L "$0" ]; then
	# if path is not a symlink, find relatively
	VSCODE_PATH="$(dirname "$0")/../../.."
else
	if command -v readlink >/dev/null; then
		# if readlink exists, follow the symlink and find relatively
		VSCODE_PATH="$(dirname "$(readlink -f "$0")")/../../.."
	else
		# else use the standard install location
		VSCODE_PATH="/usr/share/cursor"
	fi
fi

ELECTRON="$VSCODE_PATH/cursor.exe"
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$@"
exit $?

extra /.." in the VSCODE_PATH and removed –ms-enable-electron-run-as-node` from the final command, as that was throwing errors and preventing the path to the folder from propogateing.

this make me angary :triumph: