diff --git a/src/git/git.ts b/src/git/git.ts index 27e8e37..bd92a23 100644 --- a/src/git/git.ts +++ b/src/git/git.ts @@ -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, ' ')}`);