ENH: play it safe and restore the value of LC_MESSAGES
This commit is contained in:
parent
d306ab66b1
commit
74e606a270
|
@ -253,7 +253,12 @@ int cmCTestUpdateHandler::ProcessHandler()
|
|||
std::string errors;
|
||||
|
||||
// make sure
|
||||
std::string saveLCMessages;
|
||||
const char* lcmess = cmSystemTools::GetEnv("LC_MESSAGES");
|
||||
if(lcmess)
|
||||
{
|
||||
saveLCMessages = lcmess;
|
||||
}
|
||||
// if LC_MESSAGES is not set to en_EN, then
|
||||
// set it, so that svn/cvs info will be in english
|
||||
if(! (lcmess && strcmp(lcmess, "en_EN") == 0))
|
||||
|
@ -1110,7 +1115,18 @@ int cmCTestUpdateHandler::ProcessHandler()
|
|||
}
|
||||
os << "</UpdateReturnStatus>" << std::endl;
|
||||
os << "</Update>" << std::endl;
|
||||
|
||||
// restore the value of LC_MESSAGES after running the version control
|
||||
// commands
|
||||
if(saveLCMessages.size())
|
||||
{
|
||||
std::string put = "LC_MESSAGES=";
|
||||
put += saveLCMessages;
|
||||
cmSystemTools::PutEnv(put.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
cmSystemTools::UnsetEnv("LC_MESSAGES");
|
||||
}
|
||||
if (! res )
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
|
|
Loading…
Reference in New Issue