{"action":"opened","issue":{"url":"https://api.github.com/repos/nanoc/nanoc/issues/838","repository_url":"https://api.github.com/repos/nanoc/nanoc","labels_url":"https://api.github.com/repos/nanoc/nanoc/issues/838/labels{/name}","comments_url":"https://api.github.com/repos/nanoc/nanoc/issues/838/comments","events_url":"https://api.github.com/repos/nanoc/nanoc/issues/838/events","html_url":"https://github.com/nanoc/nanoc/issues/838","id":139308282,"number":838,"title":"Cannot run rubocop after nanoc with rake","user":{"login":"agross","id":16245,"avatar_url":"https://avatars.githubusercontent.com/u/16245?v=3","gravatar_id":"","url":"https://api.github.com/users/agross","html_url":"https://github.com/agross","followers_url":"https://api.github.com/users/agross/followers","following_url":"https://api.github.com/users/agross/following{/other_user}","gists_url":"https://api.github.com/users/agross/gists{/gist_id}","starred_url":"https://api.github.com/users/agross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agross/subscriptions","organizations_url":"https://api.github.com/users/agross/orgs","repos_url":"https://api.github.com/users/agross/repos","events_url":"https://api.github.com/users/agross/events{/privacy}","received_events_url":"https://api.github.com/users/agross/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-08T15:39:06Z","updated_at":"2016-03-08T15:39:06Z","closed_at":null,"body":"I like to handle my nanoc builds with rake. Before and after `nanoc compile` runs there might be more things to do like running rubocop, haml_lint etc.\r\n\r\nI found that `Nanoc::CLI::CleaningStream` leaks after running the nanoc task:\r\n```ruby\r\nrequire 'nanoc'\r\nrequire 'nanoc/cli'\r\n\r\ntask :nanoc do\r\n  Nanoc::CLI.run %w(compile)\r\nend\r\n```\r\n\r\nThe first indication is that my rake \"progress report\" (that print task names in blue) no longer outputs colors after the nanoc task completed. Another indication is the exception trace below.\r\n\r\nCould you please elaborate why the cleaning stream infrastructure exists? I don't know any other tool that does something like it and I'm not sure what it's supposed to do other than printing typographic quotation marks etc. Is there a way to disable it?\r\n\r\nOutput:\r\n```\r\n$ bundle exec rake nanoc rubocop\r\n\r\n[nanoc]       # printed blue\r\nLoading site… done\r\nCompiling site…\r\n\r\nSite compiled in 1.17s.\r\n\r\n[rubocop]     # printed without colors\r\nRunning RuboCop...\r\nInspecting 38 files\r\nC.C...CCWWWW.CCCCC.CC..C...C......CCC.\r\n\r\nOffenses:\r\n\r\nprivate method `printf' called for #<Nanoc::CLI::CleaningStream:0x00000006afdd58>\r\n[\"C:/Ruby/lib/ruby/gems/2.2.0/gems/rubocop-0.37.2/lib/rubocop/formatter/clang_style_formatter.rb:12:in `block in report_file'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rubocop-0.37.2/lib/rubocop/formatter/clang_style_formatter.rb:11:in `each'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rubocop-0.37.2/lib/rubocop/formatter/clang_style_formatter.rb:11:in `report_file'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rubocop-0.37.2/lib/rubocop/formatter/progress_formatter.rb:43:in `block in finished'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rubocop-0.37.2/lib/rubocop/formatter/progress_formatter.rb:42:in `each'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rubocop-0.37.2/lib/rubocop/formatter/progress_formatter.rb:42:in `finished'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rubocop-0.37.2/lib/rubocop/formatter/formatter_set.rb:30:in `block (3 levels) in <class:FormatterSet>'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rubocop-0.37.2/lib/rubocop/formatter/formatter_set.rb:30:in `each'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rubocop-0.37.2/lib/rubocop/formatter/formatter_set.rb:30:in `block (2 levels) in <class:FormatterSet>'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rubocop-0.37.2/lib/rubocop/runner.rb:68:in `inspect_files'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rubocop-0.37.2/lib/rubocop/runner.rb:35:in `run'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rubocop-0.37.2/lib/rubocop/cli.rb:30:in `run'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rubocop-0.37.2/lib/rubocop/rake_task.rb:49:in `run_cli'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rubocop-0.37.2/lib/rubocop/rake_task.rb:37:in `run_main_task'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rubocop-0.37.2/lib/rubocop/rake_task.rb:29:in `block (2 levels) in initialize'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/file_utils_ext.rb:58:in `verbose'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rubocop-0.37.2/lib/rubocop/rake_task.rb:27:in `block in initialize'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `call'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-funnel-0.15.0.pre/lib/rake/funnel/integration/progress_report.rb:47:in `call'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-funnel-0.15.0.pre/lib/rake/funnel/integration/progress_report.rb:47:in `block (4 levels) in create_patch'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-funnel-0.15.0.pre/lib/rake/funnel/integration/progress_report.rb:47:in `call'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-funnel-0.15.0.pre/lib/rake/funnel/integration/progress_report.rb:47:in `block (4 levels) in create_patch'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-funnel-0.15.0.pre/lib/rake/funnel/tasks/timing.rb:88:in `call'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-funnel-0.15.0.pre/lib/rake/funnel/tasks/timing.rb:88:in `block (5 levels) in benchmark'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-funnel-0.15.0.pre/lib/rake/funnel/support/timing/statistics.rb:22:in `benchmark'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-funnel-0.15.0.pre/lib/rake/funnel/tasks/timing.rb:80:in `block (2 levels) in benchmark'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-funnel-0.15.0.pre/lib/rake/funnel/tasks/timing.rb:87:in `call'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-funnel-0.15.0.pre/lib/rake/funnel/tasks/timing.rb:87:in `block (4 levels) in benchmark'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'\", \"C:/Ruby/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'\", \"C:/Ruby/lib/ruby/gems/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'\", \"C:/Ruby/bin/rake:33:in `<main>'\"]\r\n```"}}