Short Description
When using cursor .
in git-bash to open Cursor IDE shows an error:
/c/Users/<username>/AppData/Local/Programs/cursor/resources/app/bin/cursor: line 62: /c/Users/<username>/AppData/Local/Programs/cursor/resources/app/bin/../cursor: No such file or directory
Please note that this is a temporary fix. This solution is going to be overwritten when you update Cursor IDE.
-
Find the path of your cursor
-
For Windows git-bash
$where cursor Output: C:\Users\<username>\AppData\Local\Programs\cursor\resources\app\bin\cursor C:\Users\<username>\AppData\Local\Programs\cursor\resources\app\bin\cursor.cmd
-
-
Go to directory
C:\Users\<username>\AppData\Local\Programs\cursor\resources\app\bin\cursor
and open cursor file using a text editor -
The content of cursor file should be something like this
#!/usr/bin/env sh # # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. ....other codes 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" CLI="$VSCODE_PATH/resources/app/out/cli.js" ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@" exit $?
-
It appears that the files in the bin directory need to be moved to a higher directory. Thus, we need to the script:
if [ ! -L "$0" ]; then # if path is not a symlink, find relatively VSCODE_PATH="$(dirname "$0")/../../.." # <--- Change default to this 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