mirror of
https://github.com/wez/wezterm.git
synced 2024-11-22 04:56:12 +03:00
Check for the presence of CARGO_BUILD_TARGET_DIR env variable (#5430)
* feat: use CARGO_BUILD_TARGET_DIR env When building in the presence of a CARGO_BUILD_TARGET_DIR, there is no target dir created inside the repo, so copying to a location within the local repo dir fails, hence we need to copy to the actual target dir that is being used. * fix: environment variable with correct name
This commit is contained in:
parent
1d3a459ca8
commit
17958dbbec
@ -168,7 +168,10 @@ END
|
||||
.join("WezTerm.app")
|
||||
.join("Contents")
|
||||
.join("Info.plist");
|
||||
let dest_plist = repo_dir.join("target").join(profile).join("Info.plist");
|
||||
let build_target_dir = std::env::var("CARGO_TARGET_DIR")
|
||||
.and_then(|s| Ok(std::path::PathBuf::from(s)))
|
||||
.unwrap_or(repo_dir.join("target").join(profile));
|
||||
let dest_plist = build_target_dir.join("Info.plist");
|
||||
println!("cargo:rerun-if-changed=assets/macos/WezTerm.app/Contents/Info.plist");
|
||||
|
||||
std::fs::copy(&src_plist, &dest_plist)
|
||||
|
Loading…
Reference in New Issue
Block a user