Skip to content

Commit

Permalink
Merge pull request #306 from cthorey/fix-cursor
Browse files Browse the repository at this point in the history
🐛 Fix commit when using Cursor for remote development
  • Loading branch information
kahole authored Nov 19, 2024
2 parents 212e592 + 2df7ec6 commit 1320c31
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 @@ -199,6 +199,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 isWindsurf = vscode.env.appName.includes('Windsurf');
let isDarwin = process.platform === 'darwin';
let isWindows = process.platform === 'win32';
Expand All @@ -208,10 +209,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 1320c31

Please sign in to comment.