Skip to content

Commit

Permalink
🐛 Fix cursor for remote development
Browse files Browse the repository at this point in the history
  • Loading branch information
cthorey committed Sep 14, 2024
1 parent f25a828 commit bdfce80
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"author": {
"name": "Kristian Andersen Hole"
},
"version": "0.6.62",
"version": "0.6.62-patchcursor",
"engines": {
"vscode": "^1.50.0"
},
Expand Down
8 changes: 8 additions & 0 deletions src/commands/commitCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ function findCodePath(): string {
// Check if we are currently running a Code Insiders or Codium build
let isInsiders = vscode.env.appName.includes('Insider');
let isCodium = vscode.env.appRoot.includes('codium');
let isCursor = vscode.env.appName.includes('Cursor');
let isDarwin = process.platform === 'darwin';
let isWindows = process.platform === 'win32';
let isRemote = !!vscode.env.remoteName;
Expand All @@ -193,10 +194,17 @@ function findCodePath(): string {
if (isCodium && !isDarwin) {
codePath = 'codium';
}

if (isInsiders && !isDarwin) {
// On Mac the binary for the Insiders build is still called `code`
codePath += '-insiders';
}

if (isCursor && isRemote) {
// Cursor remote-server does not symlink to code but to cursor.
codePath = 'cursor';
}

if (isWindows && isRemote) {
// On window remote server, 'code' alias doesn't exist
codePath += '.cmd';
Expand Down

0 comments on commit bdfce80

Please sign in to comment.