From fd10a2603c35aefac37abd55c2062844e8ea3628 Mon Sep 17 00:00:00 2001 From: nicktitov Date: Wed, 26 Nov 2025 09:20:26 +0300 Subject: Update env contract to deal with null MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit В продолжение Поддерживаем контракт в env.cpp (используется в BinaryPath), т.к. он тоже строит из `env.json.txt` окружение и при обнаружении Null падает commit_hash:6d01c031662f29c665a54fe4f4036a3bf7dea99a --- library/cpp/testing/common/env.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'library/cpp/testing/common/env.cpp') 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("")); + } } } } -- cgit v1.3