diff --git a/package.json b/package.json index c3995b5..6e4e869 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "author": { "name": "Kristian Andersen Hole" }, - "version": "0.6.62", + "version": "0.6.62-patchcursor", "engines": { "vscode": "^1.50.0" }, diff --git a/src/commands/commitCommands.ts b/src/commands/commitCommands.ts index 688a289..93cad29 100644 --- a/src/commands/commitCommands.ts +++ b/src/commands/commitCommands.ts @@ -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; @@ -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';