瀏覽代碼

Only await if we need to

main
Eric Amodio 6 年之前
父節點
當前提交
521644109d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      src/git/gitService.ts

+ 1
- 1
src/git/gitService.ts 查看文件

@ -1888,7 +1888,7 @@ export class GitService implements Disposable {
try {
const gitExtension = extensions.getExtension('vscode.git');
if (gitExtension !== undefined) {
const gitApi = ((await gitExtension.activate()) as GitExtension).getAPI(1);
const gitApi = ((gitExtension.isActive ? gitExtension.exports : await gitExtension.activate()) as GitExtension).getAPI(1);
gitPath = gitApi.git.path;
}
}

Loading…
取消
儲存