summaryrefslogtreecommitdiffstats
path: root/src/ninja.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-01-08 23:22:11 (GMT)
committerEvan Martin <martine@danga.com>2011-01-08 23:22:11 (GMT)
commita47376800efa0ef57962c9518e6fca95e86ffe6a (patch)
tree74cc50acfaabb9f3486ecb7cc09e311b9529a542 /src/ninja.cc
parent4fd99ee15d89b59a6365b45c61582d0f4031883d (diff)
downloadNinja-a47376800efa0ef57962c9518e6fca95e86ffe6a.zip
Ninja-a47376800efa0ef57962c9518e6fca95e86ffe6a.tar.gz
Ninja-a47376800efa0ef57962c9518e6fca95e86ffe6a.tar.bz2
don't log commands in dry-run mode
Diffstat (limited to 'src/ninja.cc')
-rw-r--r--src/ninja.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ninja.cc b/src/ninja.cc
index 5602806..dec8d04 100644
--- a/src/ninja.cc
+++ b/src/ninja.cc
@@ -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;
}