Browse Source

Stops throwing for a common error case

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

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

@ -27,7 +27,7 @@ async function gitCommand(cwd: string, ...args: any[]) {
} }
catch (ex) { catch (ex) {
const msg = ex && ex.toString(); 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, ' ')}`); Logger.warn('git', ...args, ` cwd='${cwd}'`, msg && `\n ${msg.replace(/\r?\n|\r/g, ' ')}`);
return ''; return '';
} }

Loading…
Cancel
Save