Skip to content

Commit

Permalink
fix setting env for mingw
Browse files Browse the repository at this point in the history
  • Loading branch information
cieslarmichal committed Dec 18, 2023
1 parent 87bf4db commit 7bdc727
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/EnvironmentParserTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ TEST_F(EnvironmentParserTest, returnsValueIfEnvVariableExists)
const auto expectedEnvValue = "test";

#if defined(_WIN32) || defined(__MINGW32__) || defined(__MINGW64__)
const std::string envNameWithEquals = envName + "=" + expectedEnvValue;
_putenv_s(envNameWithEquals.c_str());
_putenv_s("CONFIG_CXX_TEST_PATH=test");
#else
setenv(envName, expectedEnvValue, 1);
#endif
Expand Down

0 comments on commit 7bdc727

Please sign in to comment.