-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Query OUT_DIR at runtime. #770
Conversation
It seems that Cargo no longer sets OUT_DIR when compiling build.rs, but it's still available at runtime. Therefore, switch `env!` to `env::var_os`.
I looked around briefly in Cargo's history to see where this change actually happened, but couldn't find it. We could use |
This is the correcter way of doing |
Great catch, I wasn't aware of this change! Thanks! @homu r+ |
📌 Commit c94a8f5 has been approved by |
Query OUT_DIR at runtime. It seems that Cargo no longer sets OUT_DIR when compiling build.rs, but it's still available at runtime. Therefore, switch `env!` to `env::var_os`.
Query OUT_DIR at runtime. It seems that Cargo no longer sets OUT_DIR when compiling build.rs, but it's still available at runtime. Therefore, switch `env!` to `env::var_os`.
☀️ Test successful - status |
👀 Test was successful, but fast-forwarding failed: 422 Required status check "coverage/coveralls" is pending. |
It seems that Cargo no longer sets OUT_DIR when compiling build.rs, but
it's still available at runtime. Therefore, switch
env!
toenv::var_os
.