diff options
Diffstat (limited to 'editors/code/src/run.ts')
-rw-r--r-- | editors/code/src/run.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/editors/code/src/run.ts b/editors/code/src/run.ts index 17573cd82..7ac7ca3cb 100644 --- a/editors/code/src/run.ts +++ b/editors/code/src/run.ts | |||
@@ -45,7 +45,7 @@ export async function selectRunnable(ctx: Ctx, prevRunnable?: RunnableQuickPick, | |||
45 | if (items.length === 0) { | 45 | if (items.length === 0) { |
46 | // it is the debug case, run always has at least 'cargo check ...' | 46 | // it is the debug case, run always has at least 'cargo check ...' |
47 | // see crates\rust-analyzer\src\main_loop\handlers.rs, handle_runnables | 47 | // see crates\rust-analyzer\src\main_loop\handlers.rs, handle_runnables |
48 | vscode.window.showErrorMessage("There's no debug target!"); | 48 | await vscode.window.showErrorMessage("There's no debug target!"); |
49 | return; | 49 | return; |
50 | } | 50 | } |
51 | 51 | ||
@@ -65,8 +65,8 @@ export async function selectRunnable(ctx: Ctx, prevRunnable?: RunnableQuickPick, | |||
65 | disposables.push( | 65 | disposables.push( |
66 | quickPick.onDidHide(() => close()), | 66 | quickPick.onDidHide(() => close()), |
67 | quickPick.onDidAccept(() => close(quickPick.selectedItems[0])), | 67 | quickPick.onDidAccept(() => close(quickPick.selectedItems[0])), |
68 | quickPick.onDidTriggerButton((_button) => { | 68 | quickPick.onDidTriggerButton(async (_button) => { |
69 | (async () => await makeDebugConfig(ctx, quickPick.activeItems[0].runnable))(); | 69 | await makeDebugConfig(ctx, quickPick.activeItems[0].runnable); |
70 | close(); | 70 | close(); |
71 | }), | 71 | }), |
72 | quickPick.onDidChangeActive((active) => { | 72 | quickPick.onDidChangeActive((active) => { |
@@ -145,6 +145,7 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise | |||
145 | overrideCargo: runnable.args.overrideCargo, | 145 | overrideCargo: runnable.args.overrideCargo, |
146 | }; | 146 | }; |
147 | 147 | ||
148 | // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion | ||
148 | const target = vscode.workspace.workspaceFolders![0]; // safe, see main activate() | 149 | const target = vscode.workspace.workspaceFolders![0]; // safe, see main activate() |
149 | const cargoTask = await tasks.buildCargoTask(target, definition, runnable.label, args, config.cargoRunner, true); | 150 | const cargoTask = await tasks.buildCargoTask(target, definition, runnable.label, args, config.cargoRunner, true); |
150 | cargoTask.presentationOptions.clear = true; | 151 | cargoTask.presentationOptions.clear = true; |