Skip to content

Commit a4ecaa7

Browse files
committed
Fix occasional test run during debug configuration
1 parent abef76b commit a4ecaa7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

editors/code/src/cargo.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,13 @@ export class Cargo {
4848

4949
async executableFromArgs(args: readonly string[]): Promise<string> {
5050
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
5154
if (cargoArgs[0] === "run") {
52-
// a runnable from the quick pick.
5355
cargoArgs[0] = "build";
56+
} else if (cargoArgs.indexOf("--no-run") === -1) {
57+
cargoArgs.push("--no-run");
5458
}
5559

5660
let artifacts = await this.artifactsFromArgs(cargoArgs);

0 commit comments

Comments
 (0)