aboutsummaryrefslogtreecommitdiff
path: root/editors/code
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/src/cargo.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/editors/code/src/cargo.ts b/editors/code/src/cargo.ts
index 4ff24ea7d..28c7de992 100644
--- a/editors/code/src/cargo.ts
+++ b/editors/code/src/cargo.ts
@@ -48,9 +48,13 @@ export class Cargo {
48 48
49 async executableFromArgs(args: readonly string[]): Promise<string> { 49 async executableFromArgs(args: readonly string[]): Promise<string> {
50 const cargoArgs = [...args, "--message-format=json"]; 50 const cargoArgs = [...args, "--message-format=json"];
51
52 // arguments for a runnable from the quick pick should be updated.
53 // see crates\rust-analyzer\src\main_loop\handlers.rs, handle_code_lens
51 if (cargoArgs[0] === "run") { 54 if (cargoArgs[0] === "run") {
52 // a runnable from the quick pick.
53 cargoArgs[0] = "build"; 55 cargoArgs[0] = "build";
56 } else if (cargoArgs.indexOf("--no-run") === -1) {
57 cargoArgs.push("--no-run");
54 } 58 }
55 59
56 let artifacts = await this.artifactsFromArgs(cargoArgs); 60 let artifacts = await this.artifactsFromArgs(cargoArgs);