diff options
author | vsrs <[email protected]> | 2020-05-15 13:31:09 +0100 |
---|---|---|
committer | vsrs <[email protected]> | 2020-05-15 13:31:09 +0100 |
commit | a4ecaa70969067c1149711dbf1f40a8a95cb5b72 (patch) | |
tree | aafcf0f94ad3bec127782f6e64028168c72ec1c6 | |
parent | abef76bc87137203081faedd3c758796e8d6598d (diff) |
Fix occasional test run during debug configuration
-rw-r--r-- | editors/code/src/cargo.ts | 6 |
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); |