Skip to content

Commit 403f612

Browse files
committed
fix(cargo): Reuse the current target
I decided to go with this because I feel like correctness trumps performance. For those not specifying `--target`, the performance will surprise them. For those specifying `--target`, the lack of correctness will surprise them but is less easily detected. Fixes #4, #44 BREAKING CHANGE: In this case, performance is a breaking change because this might cause CI's to time out.
1 parent e421b68 commit 403f612

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/cargo.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ impl CommandCargoExt for process::Command {
139139
fn main_binary() -> Result<Self, CargoError> {
140140
let runner = escargot::CargoBuild::new()
141141
.current_release()
142+
.current_target()
142143
.run()
143144
.map_err(CargoError::with_cause)?;
144145
Ok(runner.command())
@@ -148,6 +149,7 @@ impl CommandCargoExt for process::Command {
148149
let runner = escargot::CargoBuild::new()
149150
.bin(name)
150151
.current_release()
152+
.current_target()
151153
.run()
152154
.map_err(CargoError::with_cause)?;
153155
Ok(runner.command())
@@ -157,6 +159,7 @@ impl CommandCargoExt for process::Command {
157159
let runner = escargot::CargoBuild::new()
158160
.example(name)
159161
.current_release()
162+
.current_target()
160163
.run()
161164
.map_err(CargoError::with_cause)?;
162165
Ok(runner.command())

0 commit comments

Comments
 (0)