fix: can't open git app on windows

#572
This commit is contained in:
lin onetwo 2024-07-09 00:43:47 +08:00
parent 7b82ba124e
commit e842f63278
4 changed files with 11 additions and 11 deletions

View file

@ -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",

10
pnpm-lock.yaml generated
View file

@ -272,8 +272,8 @@ importers:
specifier: 3.0.4
version: 3.0.4(esbuild@0.21.5)
'@vercel/webpack-asset-relocator-loader':
specifier: 1.7.4
version: 1.7.4
specifier: 1.7.3
version: 1.7.3
beautiful-react-hooks:
specifier: 5.0.2
version: 5.0.2(react-dom@18.3.1(react@18.3.1))(react-router-dom@6.14.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(rxjs@7.8.1)
@ -1790,8 +1790,8 @@ packages:
'@ungap/structured-clone@1.2.0':
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
'@vercel/webpack-asset-relocator-loader@1.7.4':
resolution: {integrity: sha512-RFFite6v51Qhj/eERru3qwUNCLybnceSChI5yiu9bhLpTemWbKPORAOExOgpO2W7IE/0UEh3aX6wTSHgDE/fdQ==}
'@vercel/webpack-asset-relocator-loader@1.7.3':
resolution: {integrity: sha512-vizrI18v8Lcb1PmNNUBz7yxPxxXoOeuaVEjTG9MjvDrphjiSxFZrRJ5tIghk+qdLFRCXI5HBCshgobftbmrC5g==}
'@webassemblyjs/ast@1.11.6':
resolution: {integrity: sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==}
@ -8082,7 +8082,7 @@ snapshots:
'@ungap/structured-clone@1.2.0': {}
'@vercel/webpack-asset-relocator-loader@1.7.4':
'@vercel/webpack-asset-relocator-loader@1.7.3':
dependencies:
resolve: 1.22.8

View file

@ -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

View file

@ -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
@ -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));
}
}
}
@ -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'),
});
}
}
@ -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'),
});
}
}