Permalink
Browse files

Merge pull request #368 from nico/toolpipe

Don't print 'Entering directory' when running tools.
  • Loading branch information...
evmar committed Jul 25, 2012
2 parents 0787992 + a6fee5d commit 83d5629c04a055a5794b3bfa8ef9b0ba8d97d816
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/ninja.cc
View
@@ -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

0 comments on commit 83d5629

Please sign in to comment.