Skip to content

Commit 1c6d9f3

Browse files
committed
Use commandRunner for codeQL.restartQueryServer
1 parent f196e34 commit 1c6d9f3

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

extensions/ql-vscode/src/extension.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,19 +1213,20 @@ async function activateWithInstalledDistribution(
12131213
);
12141214

12151215
ctx.subscriptions.push(
1216-
commandRunnerWithProgress(
1217-
"codeQL.restartQueryServer",
1218-
async (progress: ProgressCallback, token: CancellationToken) => {
1219-
// We restart the CLI server too, to ensure they are the same version
1220-
cliServer.restartCliServer();
1221-
await qs.restartQueryServer(progress, token);
1222-
void showAndLogInformationMessage("CodeQL Query Server restarted.", {
1223-
outputLogger: queryServerLogger,
1224-
});
1225-
},
1226-
{
1227-
title: "Restarting Query Server",
1228-
},
1216+
commandRunner("codeQL.restartQueryServer", async () =>
1217+
withProgress(
1218+
async (progress: ProgressCallback, token: CancellationToken) => {
1219+
// We restart the CLI server too, to ensure they are the same version
1220+
cliServer.restartCliServer();
1221+
await qs.restartQueryServer(progress, token);
1222+
void showAndLogInformationMessage("CodeQL Query Server restarted.", {
1223+
outputLogger: queryServerLogger,
1224+
});
1225+
},
1226+
{
1227+
title: "Restarting Query Server",
1228+
},
1229+
),
12291230
),
12301231
);
12311232

0 commit comments

Comments
 (0)