Skip to content

Commit

Permalink
Fix occasional test run during debug configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
vsrs committed May 15, 2020
1 parent abef76b commit a4ecaa7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion editors/code/src/cargo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ export class Cargo {

async executableFromArgs(args: readonly string[]): Promise<string> {
const cargoArgs = [...args, "--message-format=json"];

// arguments for a runnable from the quick pick should be updated.
// see crates\rust-analyzer\src\main_loop\handlers.rs, handle_code_lens
if (cargoArgs[0] === "run") {
// a runnable from the quick pick.
cargoArgs[0] = "build";
} else if (cargoArgs.indexOf("--no-run") === -1) {
cargoArgs.push("--no-run");
}

let artifacts = await this.artifactsFromArgs(cargoArgs);
Expand Down

0 comments on commit a4ecaa7

Please sign in to comment.