From 5531cd380684449d6342ada49d1e56fb8ec71067 Mon Sep 17 00:00:00 2001 From: chansuke Date: Sat, 28 Jan 2023 18:47:04 +0900 Subject: [PATCH] Add new environment variable `CARGO_PKG_README` --- src/cargo/core/compiler/compilation.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cargo/core/compiler/compilation.rs b/src/cargo/core/compiler/compilation.rs index ffd3881dc57..29642f13d79 100644 --- a/src/cargo/core/compiler/compilation.rs +++ b/src/cargo/core/compiler/compilation.rs @@ -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