Skip to content

Commit

Permalink
fix: await setting config to not ask before UpdateTest and format
Browse files Browse the repository at this point in the history
  • Loading branch information
roife committed Dec 26, 2024
1 parent 2bfa83b commit c17dea9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/tools/rust-analyzer/editors/code/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1155,18 +1155,18 @@ export function runSingle(ctx: CtxInit): Cmd {

if (isUpdatingTest(runnable) && ctx.config.askBeforeUpdateTest) {
const selection = await vscode.window.showInformationMessage(
'rust-analyzer',
{ detail: 'Do you want to update tests?', modal: true },
'Update Now',
'Update (and Don\'t ask again)',
"rust-analyzer",
{ detail: "Do you want to update tests?", modal: true },
"Update Now",
"Update (and Don't ask again)",
);

if (selection !== 'Update Now' && selection !== 'Update (and Don\'t ask again)') {
if (selection !== "Update Now" && selection !== "Update (and Don't ask again)") {
return;
}

if (selection === 'Update (and Don\'t ask again)') {
ctx.config.setAskBeforeUpdateTest(false);
if (selection === "Update (and Don't ask again)") {
await ctx.config.setAskBeforeUpdateTest(false);
}
}

Expand Down

0 comments on commit c17dea9

Please sign in to comment.