Skip to content

Commit 914f252

Browse files
committed
ci: Fix CI issue for Windows
1 parent 720c95d commit 914f252

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Project : leetcode-cpp
44
* Author : Wei Tan <tanwei.winterreise@gmail.com>
55
* Date : 2026-02-12 15:07:32
6-
* Last Modified Date: 2026-02-12 15:09:30
6+
* Last Modified Date: 2026-02-12 15:46:39
77
* Last Modified By : Wei Tan <tanwei.winterreise@gmail.com>
88
*/
99

@@ -63,7 +63,11 @@ static void load_dotenv(const std::string& path = ".env") {
6363
(val.front() == '\'' && val.back() == '\''))) {
6464
val = val.substr(1, val.size() - 2);
6565
}
66+
#ifdef _WIN32
67+
_putenv_s(key.c_str(), val.c_str());
68+
#else
6669
setenv(key.c_str(), val.c_str(), 1);
70+
#endif
6771
}
6872
}
6973

0 commit comments

Comments
 (0)