| 1850 | } |
| 1851 | |
| 1852 | Status DelEnvVar(std::string_view name) { |
| 1853 | #ifdef _WIN32 |
| 1854 | if (SetEnvironmentVariableA(name.data(), nullptr)) { |
| 1855 | return Status::OK(); |
| 1856 | } else { |
| 1857 | return Status::Invalid("failed deleting environment variable"); |
| 1858 | } |
| 1859 | #else |
| 1860 | if (unsetenv(name.data()) == 0) { |
| 1861 | return Status::OK(); |
| 1862 | } else { |
| 1863 | return Status::Invalid("failed deleting environment variable"); |
| 1864 | } |
| 1865 | #endif |
| 1866 | } |
| 1867 | |
| 1868 | // |
| 1869 | // Temporary directories |