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

Add CARGO_PKG_README #11645

Merged
merged 5 commits into from
Mar 7, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add new environment variable CARGO_PKG_README
chansuke committed Mar 3, 2023
commit 5531cd380684449d6342ada49d1e56fb8ec71067
4 changes: 4 additions & 0 deletions src/cargo/core/compiler/compilation.rs
Original file line number Diff line number Diff line change
@@ -343,6 +343,10 @@ impl<'cfg> Compilation<'cfg> {
"CARGO_PKG_RUST_VERSION",
&pkg.rust_version().unwrap_or(&String::new()),
)
.env(
"CARGO_PKG_README",
metadata.readme.as_ref().unwrap_or(&String::new()),
)
.cwd(pkg.root());

// Apply any environment variables from the config