Skip to content

Commit c044e20

Browse files
committed
Also detect repos that are parents of one of the workspace folders
1 parent 294d81f commit c044e20

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
@@ -220,8 +220,8 @@ async function init(
220220
reviewsManager.addReviewManager(newReviewManager);
221221
}
222222

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

0 commit comments

Comments
 (0)