mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-25 09:35:40 -05:00
Fixes incorrect 'Unable to find Git' message
This commit is contained in:
@@ -38,7 +38,9 @@ export async function activate(context: ExtensionContext) {
|
||||
}
|
||||
catch (ex) {
|
||||
Logger.error(ex);
|
||||
await window.showErrorMessage(`GitLens: Unable to find Git. Please make sure Git is installed. Also ensure that Git is either in the PATH, or that 'gitlens.advanced.git' is pointed to its installed location.`);
|
||||
if (ex.message.includes('Unable to find git')) {
|
||||
await window.showErrorMessage(`GitLens: Unable to find Git. Please make sure Git is installed. Also ensure that Git is either in the PATH, or that 'gitlens.advanced.git' is pointed to its installed location.`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,18 +34,18 @@ async function findGitDarwin(): Promise<IGit> {
|
||||
}
|
||||
catch (ex) {
|
||||
if (ex.code === 2) {
|
||||
return Promise.reject('Unable to find git');
|
||||
return Promise.reject(new Error('Unable to find git'));
|
||||
}
|
||||
return findSpecificGit(path);
|
||||
}
|
||||
}
|
||||
catch (ex) {
|
||||
return Promise.reject('Unable to find git');
|
||||
return Promise.reject(new Error('Unable to find git'));
|
||||
}
|
||||
}
|
||||
|
||||
function findSystemGitWin32(basePath: string): Promise<IGit> {
|
||||
if (!basePath) return Promise.reject('Unable to find git');
|
||||
if (!basePath) return Promise.reject(new Error('Unable to find git'));
|
||||
return findSpecificGit(path.join(basePath, 'Git', 'cmd', 'git.exe'));
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ export async function findGitPath(path?: string): Promise<IGit> {
|
||||
}
|
||||
}
|
||||
catch (ex) {
|
||||
return Promise.reject('Unable to find git');
|
||||
return Promise.reject(new Error('Unable to find git'));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user