aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/cargo.ts
diff options
context:
space:
mode:
authorBenjamin Coenen <[email protected]>2020-05-21 09:53:29 +0100
committerBenjamin Coenen <[email protected]>2020-05-21 09:53:29 +0100
commita7c8aa7c60c05db66ba4e89ae9e05c82e62507a5 (patch)
treee848f47bdf5d031c408df94222f595d2efcb2070 /editors/code/src/cargo.ts
parentc6143742bd4e625d391ac3ea860be7578ab9f53f (diff)
parenta4e6963a2313971fe7bbec97d03bc67266ef68a9 (diff)
add support of feature flag for runnables #4464
Signed-off-by: Benjamin Coenen <[email protected]>
Diffstat (limited to 'editors/code/src/cargo.ts')
-rw-r--r--editors/code/src/cargo.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/editors/code/src/cargo.ts b/editors/code/src/cargo.ts
index 28c7de992..6a41873d0 100644
--- a/editors/code/src/cargo.ts
+++ b/editors/code/src/cargo.ts
@@ -51,10 +51,14 @@ export class Cargo {
51 51
52 // arguments for a runnable from the quick pick should be updated. 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 53 // see crates\rust-analyzer\src\main_loop\handlers.rs, handle_code_lens
54 if (cargoArgs[0] === "run") { 54 switch (cargoArgs[0]) {
55 cargoArgs[0] = "build"; 55 case "run": cargoArgs[0] = "build"; break;
56 } else if (cargoArgs.indexOf("--no-run") === -1) { 56 case "test": {
57 cargoArgs.push("--no-run"); 57 if (cargoArgs.indexOf("--no-run") === -1) {
58 cargoArgs.push("--no-run");
59 }
60 break;
61 }
58 } 62 }
59 63
60 let artifacts = await this.artifactsFromArgs(cargoArgs); 64 let artifacts = await this.artifactsFromArgs(cargoArgs);