瀏覽代碼

Stops throwing for a common error case

main
Eric Amodio 7 年之前
父節點
當前提交
8f2ec85c6b
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/git/git.ts

+ 1
- 1
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 '';
}

Loading…
取消
儲存