From ffca7befb0e325e8e0457085ce80e5a4adbd49b5 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Fri, 11 Oct 2024 17:21:45 -0400 Subject: [PATCH] docs(env): CARGO_PRIMARY_PACKAGE always set for workspace members --- src/doc/src/reference/environment-variables.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/doc/src/reference/environment-variables.md b/src/doc/src/reference/environment-variables.md index c8b27ea47e1..5dafb7bcb3a 100644 --- a/src/doc/src/reference/environment-variables.md +++ b/src/doc/src/reference/environment-variables.md @@ -260,9 +260,10 @@ corresponding environment variable is set to the empty string, `""`. * `CARGO_PRIMARY_PACKAGE` --- This environment variable will be set if the package being built is primary. Primary packages are the ones the user selected on the command-line, either with `-p` flags or the defaults based - on the current directory and the default workspace members. This environment - variable will not be set when building dependencies. This is only set when - compiling the package (not when running binaries or tests). + on the current directory and the default workspace members. + This variable will not be set when building dependencies, + unless a dependency is also a workspace member that was also selected on the command-line. + This is only set when compiling the package (not when running binaries or tests). * `CARGO_TARGET_TMPDIR` --- Only set when building [integration test] or benchmark code. This is a path to a directory inside the target directory where integration tests or benchmarks are free to put any data needed by