This project is archived and is in readonly mode.

#5661 ✓committed
Rohit Arondekar

Rails runner help message is sent to stderr instead of stdout

Reported by Rohit Arondekar | September 19th, 2010 @ 08:50 AM | in 3.0.2

(ruby-1.9.2@rails)(~/bugmash/detour)९ rails --help 2>/dev/null 
Usage: rails COMMAND [ARGS]

The most common rails commands are:
 generate    Generate new code (short-cut alias: "g")
 console     Start the Rails console (short-cut alias: "c")
 server      Start the Rails server (short-cut alias: "s")
 dbconsole   Start a console for the database specified in config/database.yml
             (short-cut alias: "db")
.
.
.



(ruby-1.9.2@rails)(~/bugmash/detour)९ rails generate --help 2>/dev/null 
Usage: rails generate GENERATOR [args] [options]

General options:
  -h, [--help]     # Print generator's options and usage
  -p, [--pretend]  # Run but do not make any changes
  -f, [--force]    # Overwrite files that already exist
  -s, [--skip]     # Skip files that already exist
  -q, [--quiet]    # Suppress status output

Please choose a generator below.
.
.
.

(ruby-1.9.2@rails)(~/bugmash/detour)९ rails runner --help 2>/dev/null

It makes more sense to output help messages to stdout instead of stderr. It's easier to pipe and search (via grep) and for other reasons as well => http://stackoverflow.com/questions/1068020/app-help-should-go-to-st...

Attached is a patch that fixes this and also removes a hack in recently added test.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages