Skip to content

Commit 1675f40

Browse files
committed
docs(env): CARGO_PRIMARY_PACKAGE always set for workspace members
1 parent f5e6987 commit 1675f40

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/doc/src/reference/environment-variables.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,10 @@ corresponding environment variable is set to the empty string, `""`.
260260
* `CARGO_PRIMARY_PACKAGE` --- This environment variable will be set if the
261261
package being built is primary. Primary packages are the ones the user
262262
selected on the command-line, either with `-p` flags or the defaults based
263-
on the current directory and the default workspace members. This environment
264-
variable will not be set when building dependencies. This is only set when
265-
compiling the package (not when running binaries or tests).
263+
on the current directory and the default workspace members.
264+
This variable will not be set when building dependencies,
265+
unless a dependency is also a workspace member.
266+
This is only set when compiling the package (not when running binaries or tests).
266267
* `CARGO_TARGET_TMPDIR` --- Only set when building [integration test] or benchmark code.
267268
This is a path to a directory inside the target directory
268269
where integration tests or benchmarks are free to put any data needed by

0 commit comments

Comments
 (0)