Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'editors/code/src/commands.ts')
-rw-r--r--editors/code/src/commands.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts
index b9ad525e36..6b10073aa8 100644
--- a/editors/code/src/commands.ts
+++ b/editors/code/src/commands.ts
@@ -842,6 +842,7 @@ export function run(ctx: Ctx): Cmd {
item.detail = "rerun";
prevRunnable = item;
const task = await createTask(item.runnable, ctx.config);
+ ctx.cargoWorkspaceRootForCurrentRun = item.cargoWorkspaceRoot;
return await vscode.tasks.executeTask(task);
};
}
@@ -946,3 +947,6 @@ export function linkToCommand(ctx: Ctx): Cmd {
}
};
}
+export function getCargoWorkspaceDir(ctx: Ctx): Cmd {
+ return async () => ctx.cargoWorkspaceRootForCurrentRun;
+}