Skip to content

Commit 75817e4

Browse files
feat: test without the safe getenv
1 parent 9a3151f commit 75817e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/workspace.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace codspeed {
99

1010
std::string safe_getenv(const char* var_name) {
11-
#ifdef _WIN32
11+
#ifdef _WIN32_FOOBARBAZ_UNDEFINED
1212
// On Windows, use _dupenv_s instead of std::getenv for thread safety
1313
// and to avoid issues with buffer ownership
1414
char* value;
@@ -26,7 +26,7 @@ std::string safe_getenv(const char* var_name) {
2626
#endif
2727
}
2828

29-
std::string get_path_relative_to_workspace(const std::string &path) {
29+
std::string get_path_relative_to_workspace(const std::string& path) {
3030
// 1. Check for bazel usage, through the BUILD_WORKSPACE_DIRECTORY env var
3131
// If so, __FILE__ will already be relative to the bazel workspace root
3232
if (!safe_getenv("BUILD_WORKSPACE_DIRECTORY").empty()) {

0 commit comments

Comments
 (0)