-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
assert_cmd::cargo::cargo_bin returns incorrect path when used from integration tests. The tests are ran from the build-dir, but assert_cmd expects them to be in the target-dir.
Lines 220 to 233 in ee88946
| // Adapted from | |
| // https://github.com/rust-lang/cargo/blob/485670b3983b52289a2f353d589c57fae2f60f82/tests/testsuite/support/mod.rs#L507 | |
| fn target_dir() -> path::PathBuf { | |
| env::current_exe() | |
| .ok() | |
| .map(|mut path| { | |
| path.pop(); | |
| if path.ends_with("deps") { | |
| path.pop(); | |
| } | |
| path | |
| }) | |
| .expect("this should only be used where a `current_exe` can be set") | |
| } |
The same code in snapbox is already deprecated:
Metadata
Metadata
Assignees
Labels
No labels