From 48cd236d121eeeffe5ceab4e89725c9e2ec4ea99 Mon Sep 17 00:00:00 2001 From: sharnoff Date: Thu, 7 Jan 2021 20:08:48 +0000 Subject: [PATCH] add doc note about environment variables for missing manifest keys --- src/doc/src/reference/environment-variables.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/doc/src/reference/environment-variables.md b/src/doc/src/reference/environment-variables.md index d00da102869..39ccb7e263b 100644 --- a/src/doc/src/reference/environment-variables.md +++ b/src/doc/src/reference/environment-variables.md @@ -188,6 +188,9 @@ let version = env!("CARGO_PKG_VERSION"); `version` will now contain the value of `CARGO_PKG_VERSION`. +Note that if one of these values is not provided in the manifest, the +corresponding environment variable is set to the empty string, `""`. + * `CARGO` — Path to the `cargo` binary performing the build. * `CARGO_MANIFEST_DIR` — The directory containing the manifest of your package. * `CARGO_PKG_VERSION` — The full version of your package.