From 8f2ec85c6b066a6219d944ff87a77372972e80a8 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 13 Apr 2017 23:56:12 -0400 Subject: [PATCH] Stops throwing for a common error case --- src/git/git.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/git/git.ts b/src/git/git.ts index 1bafd06..2ce5823 100644 --- a/src/git/git.ts +++ b/src/git/git.ts @@ -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 ''; }