microsoft / sarif-vscode-extension

SARIF Microsoft Visual Studio Code extension
MIT License
110 stars 49 forks source link

Convert to using `openRepository` API #525

Open aeisenberg opened 1 year ago

aeisenberg commented 1 year ago

The way we are getting git repositories in the extension is subject to race conditions. It might be that the getPrimaryRepository function gets the repository, but it is not yet initialized.

A better approach would be to convert getPrimaryRepository to an async function and then call openRepository on the repository that was returned.

_Originally posted by @50Wliu in https://github.com/microsoft/sarif-vscode-extension/pull/522#discussion_r1333610235_