This project is archived and is in readonly mode.
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
-
David Trasbo September 19th, 2010 @ 02:16 PM
+1
I propose silencing the --help output in the test to avoid noise. I've amended your patch to do that.
-
Rohit Arondekar September 19th, 2010 @ 04:00 PM
Why do you need to use silence? For me, on 1.9.2 the master branch the help text doesn't get output while running the tests. Does that happen for you?
-
Repository September 20th, 2010 @ 12:45 AM
- State changed from new to committed
(from [fd53bc85e7c4f57edbff1dd68b37cca320efee77]) Send 'rails runner' help message to stdout instead of stderr.
[#5661 state:committed]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
http://github.com/rails/rails/commit/fd53bc85e7c4f57edbff1dd68b37cc... -
Repository September 20th, 2010 @ 12:48 AM
(from [68034efea1d915096a4d83343a927d8551e3c1fd]) Send 'rails runner' help message to stdout instead of stderr.
[#5661 state:committed]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
http://github.com/rails/rails/commit/68034efea1d915096a4d83343a927d... -
Rohit Arondekar September 20th, 2010 @ 05:16 AM
- State changed from committed to open
One last patch only for 3-0-stable to fix the failing test.
This happened because the patch in #4249 didn't get applied to 3-0-stable before this one.
-
Repository September 20th, 2010 @ 06:30 AM
- State changed from open to committed
(from [39cb27b414714d7834ec9441108bc9b637956148]) Fix output of 'rails runner --help' [#5661 state:committed]
Backport of 76266a
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
http://github.com/rails/rails/commit/39cb27b414714d7834ec9441108bc9...
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>
People watching this ticket
Attachments
Tags
Referenced by
- 5661 Rails runner help message is sent to stderr instead of stdout [#5661 state:committed]
- 5661 Rails runner help message is sent to stderr instead of stdout [#5661 state:committed]
- 5661 Rails runner help message is sent to stderr instead of stdout (from [39cb27b414714d7834ec9441108bc9b637956148]) Fix out...