aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-06-06 16:05:59 +0100
committerGitHub <[email protected]>2020-06-06 16:05:59 +0100
commitd4a92b4fefecbd63d8c7c82a5553cd209c068144 (patch)
treee68c51b3af17e54329498daca038f85cb73911bf
parenta609336d7287b3ddddbde30b1f0fb606bf149baf (diff)
parentb91fa7494ece3ca26e5797c4b23469d82b8e1322 (diff)
Merge #4769
4769: Fix Run lens. r=matklad a=vsrs This PR fixes a bug introduced in https://github.com/rust-analyzer/rust-analyzer/pull/4710: second and all subsequent clicks on the Run lens produce invalid commands: 1. `cargo test --package ra_ide --lib -- hover::tests::test_hover_enum_has_impl_action --exact --nocapture` 2. `cargo test --package ra_ide --lib -- hover::tests::test_hover_enum_has_impl_action --exact --nocapture` **`-- hover::tests::test_hover_enum_has_impl_action --exact --nocapture`** 3. `cargo test --package ra_ide --lib -- hover::tests::test_hover_enum_has_impl_action --exact --nocapture` **`-- hover::tests::test_hover_enum_has_impl_action --exact --nocapture -- hover::tests::test_hover_enum_has_impl_action --exact --nocapture`** Co-authored-by: vsrs <[email protected]>
-rw-r--r--editors/code/src/run.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/code/src/run.ts b/editors/code/src/run.ts
index 5c790741f..bb060cfe1 100644
--- a/editors/code/src/run.ts
+++ b/editors/code/src/run.ts
@@ -110,7 +110,7 @@ export function createTask(runnable: ra.Runnable): vscode.Task {
110 switch (runnable.kind) { 110 switch (runnable.kind) {
111 case "cargo": command = toolchain.getPathForExecutable("cargo"); 111 case "cargo": command = toolchain.getPathForExecutable("cargo");
112 } 112 }
113 const args = runnable.args.cargoArgs; 113 const args = [...runnable.args.cargoArgs]; // should be a copy!
114 if (runnable.args.executableArgs.length > 0) { 114 if (runnable.args.executableArgs.length > 0) {
115 args.push('--', ...runnable.args.executableArgs); 115 args.push('--', ...runnable.args.executableArgs);
116 } 116 }