summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2012-07-25 18:02:34 (GMT)
committerEvan Martin <martine@danga.com>2012-07-25 18:02:34 (GMT)
commit83d5629c04a055a5794b3bfa8ef9b0ba8d97d816 (patch)
tree9e489636a9b4dd33f2b3cb0e7324b523f5787bd4
parent0787992b991f7f0617e1bcb69e71201f2a80b028 (diff)
parenta6fee5d01df65dff1a7b104d40c7a35e0d0a06b5 (diff)
downloadNinja-83d5629c04a055a5794b3bfa8ef9b0ba8d97d816.zip
Ninja-83d5629c04a055a5794b3bfa8ef9b0ba8d97d816.tar.gz
Ninja-83d5629c04a055a5794b3bfa8ef9b0ba8d97d816.tar.bz2
Merge pull request #368 from nico/toolpipe
Don't print 'Entering directory' when running tools.
-rw-r--r--src/ninja.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ninja.cc b/src/ninja.cc
index 809768c..619c3bf 100644
--- a/src/ninja.cc
+++ b/src/ninja.cc
@@ -707,7 +707,10 @@ int main(int argc, char** argv) {
// The formatting of this string, complete with funny quotes, is
// so Emacs can properly identify that the cwd has changed for
// subsequent commands.
- printf("ninja: Entering directory `%s'\n", working_dir);
+ // Don't print this if a tool is being used, so that tool output
+ // can be piped into a file without this string showing up.
+ if (tool == "")
+ printf("ninja: Entering directory `%s'\n", working_dir);
#ifdef _WIN32
if (_chdir(working_dir) < 0) {
#else