We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 720c95d commit 914f252Copy full SHA for 914f252
1 file changed
src/main.cpp
@@ -3,7 +3,7 @@
3
* Project : leetcode-cpp
4
* Author : Wei Tan <tanwei.winterreise@gmail.com>
5
* Date : 2026-02-12 15:07:32
6
- * Last Modified Date: 2026-02-12 15:09:30
+ * Last Modified Date: 2026-02-12 15:46:39
7
* Last Modified By : Wei Tan <tanwei.winterreise@gmail.com>
8
*/
9
@@ -63,7 +63,11 @@ static void load_dotenv(const std::string& path = ".env") {
63
(val.front() == '\'' && val.back() == '\''))) {
64
val = val.substr(1, val.size() - 2);
65
}
66
+#ifdef _WIN32
67
+ _putenv_s(key.c_str(), val.c_str());
68
+#else
69
setenv(key.c_str(), val.c_str(), 1);
70
+#endif
71
72
73
0 commit comments