summaryrefslogtreecommitdiffstats
path: root/library/cpp/testing/common/env.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'library/cpp/testing/common/env.cpp')
-rw-r--r--library/cpp/testing/common/env.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/library/cpp/testing/common/env.cpp b/library/cpp/testing/common/env.cpp
index 41bf2b20aba..a536aab2a7b 100644
--- a/library/cpp/testing/common/env.cpp
+++ b/library/cpp/testing/common/env.cpp
@@ -224,7 +224,12 @@ namespace NPrivate {
while (file.ReadLine(ljson) > 0) {
NJson::ReadJsonTree(ljson, &envVar);
for (const auto& entry : envVar.GetMap()) {
- SetEnv(entry.first, entry.second.GetStringSafe(""));
+ auto value = entry.second;
+ if (value.GetType() == NJson::JSON_NULL) {
+ UnsetEnv(entry.first);
+ } else {
+ SetEnv(entry.first, value.GetStringSafe(""));
+ }
}
}
}