From 36f570dbd230d34c24f8e56310224af0cdf9e5cf Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Fri, 28 Jan 2011 04:16:11 +0800 Subject: Apply exit code 1 when commands don't succeed so that other libraries can properly detect the failure. --- railties/lib/rails/commands.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'railties/lib') diff --git a/railties/lib/rails/commands.rb b/railties/lib/rails/commands.rb index 46363d7921..f015b33e18 100644 --- a/railties/lib/rails/commands.rb +++ b/railties/lib/rails/commands.rb @@ -62,6 +62,7 @@ when 'application', 'runner' when 'new' puts "Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first.\n" puts "Type 'rails' for help." + exit(false) when '--version', '-v' ARGV.unshift '--version' @@ -91,4 +92,5 @@ In addition to those, there are: All commands can be run with -h for more information. EOT + exit(false) end -- cgit v1.2.3