Merge pull request #463 from blobs0/patch-1

Patch Linux Path Not Found
This commit is contained in:
Pin Studios 2025-04-03 02:06:52 +08:00 committed by GitHub
commit 523daea54e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,7 +46,7 @@ def get_cursor_paths(translator=None) -> Tuple[str, str]:
default_paths = { default_paths = {
"Darwin": "/Applications/Cursor.app/Contents/Resources/app", "Darwin": "/Applications/Cursor.app/Contents/Resources/app",
"Windows": os.path.join(os.getenv("LOCALAPPDATA", ""), "Programs", "Cursor", "resources", "app"), "Windows": os.path.join(os.getenv("LOCALAPPDATA", ""), "Programs", "Cursor", "resources", "app"),
"Linux": ["/opt/Cursor/resources/app", "/usr/share/cursor/resources/app", os.path.expanduser("~/.local/share/cursor/resources/app")] "Linux": ["/opt/Cursor/resources/app", "/usr/share/cursor/resources/app", os.path.expanduser("~/.local/share/cursor/resources/app"), "/usr/lib/cursor/app/"]
} }
# If config doesn't exist, create it with default paths # If config doesn't exist, create it with default paths
@ -170,7 +170,7 @@ def get_workbench_cursor_path(translator=None) -> str:
"main": "out/vs/workbench/workbench.desktop.main.js" "main": "out/vs/workbench/workbench.desktop.main.js"
}, },
"Linux": { "Linux": {
"bases": ["/opt/Cursor/resources/app", "/usr/share/cursor/resources/app"], "bases": ["/opt/Cursor/resources/app", "/usr/share/cursor/resources/app", "/usr/lib/cursor/app/"],
"main": "out/vs/workbench/workbench.desktop.main.js" "main": "out/vs/workbench/workbench.desktop.main.js"
} }
} }
@ -786,4 +786,4 @@ def run(translator=None):
if __name__ == "__main__": if __name__ == "__main__":
from main import translator as main_translator from main import translator as main_translator
run(main_translator) run(main_translator)