Skip to content

Commit

Permalink
Merge pull request #1414 from tgodzik/fix-doctor
Browse files Browse the repository at this point in the history
bugfix: Don't run command without clicking and fix infinite recursion
  • Loading branch information
tgodzik authored Aug 7, 2023
2 parents edc446c + caffc12 commit 9ccd390
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions packages/metals-vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,9 @@ function launchMetals(
commands.executeCommand(workbenchCommands.focusDiagnostics)
);

registerCommand(ClientCommands.RunDoctor, () =>
commands.executeCommand(ClientCommands.RunDoctor)
);
registerCommand(ClientCommands.RunDoctor, async () => {
await doctorProvider.runDoctor();
});

registerCommand(ClientCommands.ToggleLogs, () => {
if (channelOpen) {
Expand Down Expand Up @@ -722,13 +722,7 @@ function launchMetals(
item.tooltip = params.tooltip;
}
if (params.command) {
const command = params.command;
item.command = params.command;
commands.getCommands().then((values) => {
if (values.includes(command)) {
commands.executeCommand(command);
}
});
} else {
item.command = undefined;
}
Expand Down

0 comments on commit 9ccd390

Please sign in to comment.