----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45888/#review127915 ----------------------------------------------------------- Fix it, then Ship it! 3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp (lines 56 - 68) How about: ``` // Do not set the variable if already set and `overwrite` was not specified. // // Per MSDN[1], `GetEnvironmentVariable` returns 0 on error and sets the // error code to `ERROR_ENVVAR_NOT_FOUND` if the variable was not found. // // [1] https://msdn.microsoft.com/en-us/library/windows/desktop/ms683188(v=vs.85).aspx if (!overwrite && ::GetEnvironmentVariable(key.c_str(), NULL, 0) != 0 && ::GetLastError() == ERROR_ENVVAR_NOT_FOUND) { return; } ``` - Michael Park On April 7, 2016, 7:31 p.m., Alex Clemmer wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/45888/ > ----------------------------------------------------------- > > (Updated April 7, 2016, 7:31 p.m.) > > > Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun. > > > Repository: mesos > > > Description > ------- > > Stout: Implemented `os::setenv` on Windows. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 6a391ff198ab724f689bcef79d4e2e05a786cbc2 > > Diff: https://reviews.apache.org/r/45888/diff/ > > > Testing > ------- > > > Thanks, > > Alex Clemmer > >