Skip to content

Commit fe75322

Browse files
authored
Also detect repos that are parents of one of the workspace folders (#8010)
Fixes #7964
1 parent 827d698 commit fe75322

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ async function init(
212212
reviewsManager.addReviewManager(newReviewManager);
213213
}
214214

215-
// Check if repo is in one of the workspace folders
216-
if (workspaceFolders && !workspaceFolders.some(folder => isDescendant(folder.uri.fsPath, repo.rootUri.fsPath))) {
215+
// Check if repo is in one of the workspace folders or vice versa
216+
if (workspaceFolders && !workspaceFolders.some(folder => isDescendant(folder.uri.fsPath, repo.rootUri.fsPath) || isDescendant(repo.rootUri.fsPath, folder.uri.fsPath))) {
217217
Logger.appendLine(`Repo ${repo.rootUri} is not in a workspace folder, ignoring.`, ACTIVATION);
218218
return;
219219
}

0 commit comments

Comments
 (0)