From 521644109d982d2fabbad9adc883477f96f84022 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 13 Sep 2018 23:26:00 -0400 Subject: [PATCH] Only await if we need to --- src/git/gitService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/git/gitService.ts b/src/git/gitService.ts index 84b9f69..adea137 100644 --- a/src/git/gitService.ts +++ b/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; } }