Browse Source

Adds fallback for main repo detection failures

main
Eric Amodio 1 year ago
parent
commit
d8993ee335
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/commands/git/worktree.ts

+ 1
- 1
src/commands/git/worktree.ts View File

@ -228,7 +228,7 @@ export class WorktreeGitCommand extends QuickCommand {
}
// Ensure we use the "main" repository if we are in a worktree already
state.repo = await state.repo.getMainRepository();
state.repo = (await state.repo.getMainRepository()) ?? state.repo;
assertStateStepRepository(state);
const result = yield* ensureAccessStep(state, context, PlusFeatures.Worktrees);

Loading…
Cancel
Save