Skip to content

Commit

Permalink
fix: can't open git app on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Jul 8, 2024
1 parent 7b82ba1 commit e842f63
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"@types/styled-components": "5.1.34",
"@types/webpack-bundle-analyzer": "4.7.0",
"@types/webpack-node-externals": "3.0.4",
"@vercel/webpack-asset-relocator-loader": "1.7.4",
"@vercel/webpack-asset-relocator-loader": "1.7.3",
"beautiful-react-hooks": "5.0.2",
"chai": "5.1.1",
"circular-dependency-plugin": "5.2.2",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/services/native/externalApp/launch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function launchExternalEditor(fullPath: string, editor: FoundEditor
detached: true,
};

if (editor.usesShell) {
if (editor.usesShell === true) {
spawn(`"${editorPath}"`, [`"${fullPath}"`], { ...options, shell: true });
} else if (isMac) {
// In macOS we can use `open`, which will open the right executable file
Expand Down
8 changes: 4 additions & 4 deletions src/services/native/externalApp/win32.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/strict-boolean-expressions */
/* eslint-disable unicorn/import-style */
import * as Path from 'path';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error
Expand Down Expand Up @@ -94,8 +95,7 @@ const registryKeysForJetBrainsIDE = (product: string): readonly RegistryKey[] =>
if (minorRelease > 0) {
key = `${key}.${minorRelease}`;
}
result.push(Wow64LocalMachineUninstallKey(key));
result.push(CurrentUserUninstallKey(key));
result.push(Wow64LocalMachineUninstallKey(key), CurrentUserUninstallKey(key));
}
}
}
Expand Down Expand Up @@ -389,7 +389,7 @@ export async function getAvailableEditors(editorName?: string): Promise<Readonly
results.push({
editor: editor.name,
path,
usesShell: path.endsWith('.cmd'),
usesShell: path.endsWith('.cmd') || path.endsWith('.bat'),
});
}
}
Expand All @@ -411,7 +411,7 @@ export async function getAvailableGitGUIApps(): Promise<ReadonlyArray<IFoundEdit
results.push({
editor: guiApp.name,
path,
usesShell: path.endsWith('.cmd'),
usesShell: path.endsWith('.cmd') || path.endsWith('.bat'),
});
}
}
Expand Down

0 comments on commit e842f63

Please sign in to comment.