[Rake-devel] Bug? Shell output does not get printed in latest Rake releases

Hongli Lai hongli at phusion.nl
Mon Oct 27 10:36:00 EDT 2008

The following Rake task

   task :default do
     sh "true"

is supposed to cause Rake to print "true" on the terminal. Earlier 
versions did this, but the latest version of Rake (0.8.3) does not. 
According to --help, --verbose is turned on by default, and thus Rake is 
supposed to print any shell commands by default.

Running Rake with --verbose explicitly causes shell commands to be 
printed, as does calling "RakeFileUtils.verbose_flag = true" in the 

The offending line is in 'def sh' in rake.rb:

       if RakeFileUtils.verbose_flag == :default
         options[:verbose] = false
       rake_output_message cmd.join(" ") if options[:verbose]

Is this a bug? I think it is, but according to 'git blame', this 
behavior was added in commit 5bf0bd6b2accbe, which dates back to April 2008.

Hongli Lai
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: info at phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

More information about the Rake-devel mailing list