Skip to content

Commit

Permalink
Disable git initialize repository when no open workspace
Browse files Browse the repository at this point in the history
Fixes #7487

Signed-off-by: Ulysse McConnell <[email protected]>
  • Loading branch information
umcconnell authored and kittaakos committed Apr 4, 2020
1 parent 5e45d2b commit 2270537
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/git/src/browser/git-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,8 @@ export class GitContribution implements CommandContribution, MenuContribution, T
});
registry.registerCommand(GIT_COMMANDS.INIT_REPOSITORY, {
execute: () => this.quickOpenService.initRepository(),
isEnabled: widget => (!widget || widget instanceof ScmWidget) && !this.repositoryProvider.selectedRepository,
isVisible: widget => (!widget || widget instanceof ScmWidget) && !this.repositoryProvider.selectedRepository
isEnabled: widget => this.workspaceService.opened && (!widget || widget instanceof ScmWidget) && !this.repositoryProvider.selectedRepository,
isVisible: widget => this.workspaceService.opened && (!widget || widget instanceof ScmWidget) && !this.repositoryProvider.selectedRepository
});
}
async amend(): Promise<void> {
Expand Down

0 comments on commit 2270537

Please sign in to comment.