mirror of
https://github.com/NixOS/nix.git
synced 2025-02-16 17:02:28 +00:00
parent
72e1e23051
commit
b96d9c1687
@ -57,8 +57,6 @@ std::optional<std::string> getEnv(const std::string & key)
|
|||||||
std::optional<std::string> getEnvNonEmpty(const std::string & key) {
|
std::optional<std::string> getEnvNonEmpty(const std::string & key) {
|
||||||
auto value = getEnv(key);
|
auto value = getEnv(key);
|
||||||
if (value == "") {
|
if (value == "") {
|
||||||
// TODO: determine whether this should be a warning or an error.
|
|
||||||
warn("ignoring the '%1%' env variable, its value has been set to \"\"", key);
|
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
} else {
|
} else {
|
||||||
return value;
|
return value;
|
||||||
|
Loading…
Reference in New Issue
Block a user