From a6fee5d01df65dff1a7b104d40c7a35e0d0a06b5 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 25 Jul 2012 10:34:14 -0700 Subject: Don't print 'Entering directory' when running tools. --- src/ninja.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v0.12