Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for the presence of CARGO_BUILD_TARGET_DIR env variable #5430

Merged
merged 5 commits into from
Jun 17, 2024

Conversation

itkovian
Copy link
Contributor

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.

@itkovian itkovian force-pushed the cargo-env-target-build-dir branch from 4664b15 to 46782d6 Compare May 16, 2024 21:17
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.
@itkovian itkovian force-pushed the cargo-env-target-build-dir branch from 46782d6 to cc9940d Compare May 17, 2024 05:56
@itkovian itkovian marked this pull request as draft May 17, 2024 06:07
@itkovian itkovian marked this pull request as ready for review May 17, 2024 06:09
@@ -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_BUILD_TARGET_DIR")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be CARGO_TARGET_DIR? When is CARGO_BUILD_TARGET_DIR set?

https://doc.rust-lang.org/cargo/appendix/glossary.html?highlight=CARGO_TARGET_DIR#target

@wez wez merged commit 17958db into wez:main Jun 17, 2024
12 of 15 checks passed
@wez
Copy link
Owner

wez commented Jun 17, 2024

Thanks!

saep pushed a commit to saep/wezterm that referenced this pull request Jul 14, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants