File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -327,14 +327,19 @@ static inline std::string PlatformUtilsGetSecureEnv(const char* name) {
327327
328328#include < sys/system_properties.h>
329329
330- static inline bool PlatformUtilsGetEnvSet (const char * /* name */ ) {
331- // Stub func
332- return false ;
333- }
330+ namespace detail {
334331
335- static inline std::string PlatformUtilsGetEnv (const char * /* name */ ) {
336- // Stub func
337- return {};
332+ static inline char * ImplGetEnv (const char * name) { return getenv (name); }
333+ } // namespace detail
334+
335+ static inline bool PlatformUtilsGetEnvSet (const char * name) { return detail::ImplGetEnv (name) != nullptr ; }
336+
337+ static inline std::string PlatformUtilsGetEnv (const char * name) {
338+ auto str = detail::ImplGetEnv (name);
339+ if (str == nullptr ) {
340+ return {};
341+ }
342+ return str;
338343}
339344
340345static inline std::string PlatformUtilsGetSecureEnv (const char * /* name */ ) {
You can’t perform that action at this time.
0 commit comments