From: Christopher Dykes Date: Tue, 9 Aug 2016 23:24:21 +0000 (-0700) Subject: Look for the PATH environment variable rather than USER X-Git-Tag: v2016.08.15.00~32 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4d777293b5993289afd023c43442833e3f2ac2eb;p=folly.git Look for the PATH environment variable rather than USER Summary: Windows is weird and calls it USERNAME instead, so just use one that everything agrees on: PATH Reviewed By: yfeldblum Differential Revision: D3691072 fbshipit-source-id: 579c6484736ef47e130049c29bef8b59c66a4482 --- diff --git a/folly/experimental/test/TestUtilTest.cpp b/folly/experimental/test/TestUtilTest.cpp index c61d4432..65af5ea8 100644 --- a/folly/experimental/test/TestUtilTest.cpp +++ b/folly/experimental/test/TestUtilTest.cpp @@ -204,7 +204,7 @@ TEST_F(EnvVarSaverTest, ExampleNew) { } TEST_F(EnvVarSaverTest, ExampleExisting) { - auto key = "USER"; + auto key = "PATH"; EXPECT_NE(nullptr, getenv(key)); auto value = std::string{getenv(key)}; @@ -216,7 +216,7 @@ TEST_F(EnvVarSaverTest, ExampleExisting) { } TEST_F(EnvVarSaverTest, ExampleDeleting) { - auto key = "USER"; + auto key = "PATH"; EXPECT_NE(nullptr, getenv(key)); auto value = std::string{getenv(key)};