Browse Source

Stops re-throw of know errors

main
Eric Amodio 7 years ago
parent
commit
e1190d50a4
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      src/git/git.ts

+ 1
- 0
src/git/git.ts View File

@ -27,6 +27,7 @@ async function gitCommand(cwd: string, ...args: any[]) {
const msg = ex && ex.toString();
if (msg && (msg.includes('Not a git repository') || msg.includes('is outside repository') || msg.includes('no such path'))) {
Logger.warn('git', ...args, ` cwd='${cwd}'`, msg && `\n ${msg.replace(/\r?\n|\r/g, ' ')}`);
return '';
}
else {
Logger.error(ex, 'git', ...args, ` cwd='${cwd}'`, msg && `\n ${msg.replace(/\r?\n|\r/g, ' ')}`);

Loading…
Cancel
Save