mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-16 01:25:42 -05:00
Stops throwing for a common error case
This commit is contained in:
@@ -27,7 +27,7 @@ async function gitCommand(cwd: string, ...args: any[]) {
|
||||
}
|
||||
catch (ex) {
|
||||
const msg = ex && ex.toString();
|
||||
if (msg && (msg.includes('Not a git repository') || msg.includes('is outside repository') || msg.includes('no such path'))) {
|
||||
if (msg && (msg.includes('Not a git repository') || msg.includes('is outside repository') || msg.includes('no such path') || msg.includes('does not have any commits'))) {
|
||||
Logger.warn('git', ...args, ` cwd='${cwd}'`, msg && `\n ${msg.replace(/\r?\n|\r/g, ' ')}`);
|
||||
return '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user