瀏覽代碼

Fix update return status

Andy Cedilnik 23 年之前
父節點
當前提交
a5f5f63c27
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      Source/cmCTest.cxx

+ 6 - 2
Source/cmCTest.cxx

@@ -472,8 +472,12 @@ int cmCTest::UpdateDirectory()
      << "\t<BuildStamp>" << m_CurrentTag << "-Experimental</BuildStamp>\n"
      << "\t<BuildStamp>" << m_CurrentTag << "-Experimental</BuildStamp>\n"
      << "\t<StartDateTime>" << start_time << "</StartDateTime>\n"
      << "\t<StartDateTime>" << start_time << "</StartDateTime>\n"
      << "\t<UpdateCommand>" << command << "</UpdateCommand>\n"
      << "\t<UpdateCommand>" << command << "</UpdateCommand>\n"
-     << "\t<UpdateReturnStatus>" << retVal 
-     << "</UpdateReturnStatus>" << std::endl;
+     << "\t<UpdateReturnStatus>";
+  if ( retVal )
+    {
+    os << retVal;
+    }
+  os << "</UpdateReturnStatus>" << std::endl;
 
 
   std::vector<cmStdString> lines;
   std::vector<cmStdString> lines;
   cmSystemTools::Split(output.c_str(), lines);
   cmSystemTools::Split(output.c_str(), lines);