Skip to content

Commit

Permalink
Adds fallback for main repo detection failures
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Mar 8, 2023
1 parent d2950cd commit d8993ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/git/worktree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export class WorktreeGitCommand extends QuickCommand<State> {
}

// 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);
Expand Down

0 comments on commit d8993ee

Please sign in to comment.