MCPcopy Create free account
hub / github.com/MemNixFS/MemNixFS / real_env

Function real_env

src/core/app_paths.cpp:60–63  ·  view source on GitHub ↗

getenv that treats an empty value as unset (empty %VAR% / $VAR is useless).

Source from the content-addressed store, hash-verified

58namespace {
59// getenv that treats an empty value as unset (empty %VAR% / $VAR is useless).
60const char* real_env(const char* key) {
61 const char* v = std::getenv(key);
62 return (v && *v) ? v : nullptr;
63}
64#ifdef _WIN32
65constexpr bool kWindows = true;
66#else

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected