mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Fix occasional test run during debug configuration
This commit is contained in:
parent
abef76bc87
commit
a4ecaa7096
1 changed files with 5 additions and 1 deletions
|
@ -48,9 +48,13 @@ export class Cargo {
|
||||||
|
|
||||||
async executableFromArgs(args: readonly string[]): Promise<string> {
|
async executableFromArgs(args: readonly string[]): Promise<string> {
|
||||||
const cargoArgs = [...args, "--message-format=json"];
|
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") {
|
if (cargoArgs[0] === "run") {
|
||||||
// a runnable from the quick pick.
|
|
||||||
cargoArgs[0] = "build";
|
cargoArgs[0] = "build";
|
||||||
|
} else if (cargoArgs.indexOf("--no-run") === -1) {
|
||||||
|
cargoArgs.push("--no-run");
|
||||||
}
|
}
|
||||||
|
|
||||||
let artifacts = await this.artifactsFromArgs(cargoArgs);
|
let artifacts = await this.artifactsFromArgs(cargoArgs);
|
||||||
|
|
Loading…
Reference in a new issue