From a47376800efa0ef57962c9518e6fca95e86ffe6a Mon Sep 17 00:00:00 2001 From: Evan Martin Date: Sat, 8 Jan 2011 15:22:11 -0800 Subject: [PATCH] don't log commands in dry-run mode --- src/ninja.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.7.4