don't log commands in dry-run mode
authorEvan Martin <martine@danga.com>
Sat, 8 Jan 2011 23:22:11 +0000 (15:22 -0800)
committerEvan Martin <martine@danga.com>
Sat, 8 Jan 2011 23:22:11 +0000 (15:22 -0800)
src/ninja.cc

index 5602806a1080179de71c5680d2730c8a00d08dbd..dec8d04e3043be0b0d2fbc83a1b90fc50b6b89cb 100644 (file)
@@ -97,7 +97,7 @@ int main(int argc, char** argv) {
     return 1;
   }
 
-  if (!state.build_log_->OpenForWrite(kLogPath, &err)) {
+  if (!config.dry_run && !state.build_log_->OpenForWrite(kLogPath, &err)) {
     fprintf(stderr, "error opening build log: %s\n", err.c_str());
     return 1;
   }