cli-test: Respect CARGO_TARGET_DIR

Fix an error where cli-test would fail if CARGO_TARGET_DIR was being
used.
This commit is contained in:
Slack Coder 2023-05-13 13:56:29 -05:00 committed by Alexis Sellier
parent ad48514ddd
commit dc709da33f
No known key found for this signature in database
1 changed files with 2 additions and 1 deletions

View File

@ -216,8 +216,9 @@ impl TestFormula {
} else {
"release"
};
let cargo_target_dir = env::var("CARGO_TARGET_DIR").unwrap_or("target".to_string());
let path = Path::new(manifest.as_str());
let path = path.parent().unwrap().join("target").join(profile);
let path = path.parent().unwrap().join(cargo_target_dir).join(profile);
bins = format!("{}:{bins}", path.display());
}